// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning;

public partial class MachineLearningNamespacedClient : NamespacedClientProxy
{
	/// <summary>
	/// <para>
	/// Initializes a new instance of the <see cref="MachineLearningNamespacedClient"/> class for mocking.
	/// </para>
	/// </summary>
	protected MachineLearningNamespacedClient() : base()
	{
	}

	internal MachineLearningNamespacedClient(ElasticsearchClient client) : base(client)
	{
	}

	/// <summary>
	/// <para>
	/// Clear trained model deployment cache.
	/// Cache will be cleared on all nodes where the trained model is assigned.
	/// A trained model deployment may have an inference cache enabled.
	/// As requests are handled by each allocated node, their responses may be cached on that individual node.
	/// Calling this API clears the caches without restarting the deployment.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/clear-trained-model-deployment-cache.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearTrainedModelDeploymentCacheResponse> ClearTrainedModelDeploymentCacheAsync(ClearTrainedModelDeploymentCacheRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ClearTrainedModelDeploymentCacheRequest, ClearTrainedModelDeploymentCacheResponse, ClearTrainedModelDeploymentCacheRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear trained model deployment cache.
	/// Cache will be cleared on all nodes where the trained model is assigned.
	/// A trained model deployment may have an inference cache enabled.
	/// As requests are handled by each allocated node, their responses may be cached on that individual node.
	/// Calling this API clears the caches without restarting the deployment.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/clear-trained-model-deployment-cache.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearTrainedModelDeploymentCacheResponse> ClearTrainedModelDeploymentCacheAsync(ClearTrainedModelDeploymentCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearTrainedModelDeploymentCacheRequestDescriptor, ClearTrainedModelDeploymentCacheResponse, ClearTrainedModelDeploymentCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear trained model deployment cache.
	/// Cache will be cleared on all nodes where the trained model is assigned.
	/// A trained model deployment may have an inference cache enabled.
	/// As requests are handled by each allocated node, their responses may be cached on that individual node.
	/// Calling this API clears the caches without restarting the deployment.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/clear-trained-model-deployment-cache.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearTrainedModelDeploymentCacheResponse> ClearTrainedModelDeploymentCacheAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearTrainedModelDeploymentCacheRequestDescriptor(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearTrainedModelDeploymentCacheRequestDescriptor, ClearTrainedModelDeploymentCacheResponse, ClearTrainedModelDeploymentCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear trained model deployment cache.
	/// Cache will be cleared on all nodes where the trained model is assigned.
	/// A trained model deployment may have an inference cache enabled.
	/// As requests are handled by each allocated node, their responses may be cached on that individual node.
	/// Calling this API clears the caches without restarting the deployment.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/clear-trained-model-deployment-cache.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearTrainedModelDeploymentCacheResponse> ClearTrainedModelDeploymentCacheAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action<ClearTrainedModelDeploymentCacheRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearTrainedModelDeploymentCacheRequestDescriptor(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearTrainedModelDeploymentCacheRequestDescriptor, ClearTrainedModelDeploymentCacheResponse, ClearTrainedModelDeploymentCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Close anomaly detection jobs.
	/// A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.
	/// When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data.
	/// If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request.
	/// When a datafeed that has a specified end date stops, it automatically closes its associated job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-close-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<CloseJobResponse> CloseJobAsync(CloseJobRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<CloseJobRequest, CloseJobResponse, CloseJobRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Close anomaly detection jobs.
	/// A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.
	/// When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data.
	/// If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request.
	/// When a datafeed that has a specified end date stops, it automatically closes its associated job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-close-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<CloseJobResponse> CloseJobAsync(CloseJobRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<CloseJobRequestDescriptor, CloseJobResponse, CloseJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Close anomaly detection jobs.
	/// A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.
	/// When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data.
	/// If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request.
	/// When a datafeed that has a specified end date stops, it automatically closes its associated job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-close-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<CloseJobResponse> CloseJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new CloseJobRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<CloseJobRequestDescriptor, CloseJobResponse, CloseJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Close anomaly detection jobs.
	/// A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.
	/// When you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data.
	/// If you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request.
	/// When a datafeed that has a specified end date stops, it automatically closes its associated job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-close-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<CloseJobResponse> CloseJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<CloseJobRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new CloseJobRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<CloseJobRequestDescriptor, CloseJobResponse, CloseJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a calendar.
	/// Removes all scheduled events from a calendar, then deletes it.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarResponse> DeleteCalendarAsync(DeleteCalendarRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteCalendarRequest, DeleteCalendarResponse, DeleteCalendarRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a calendar.
	/// Removes all scheduled events from a calendar, then deletes it.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarResponse> DeleteCalendarAsync(DeleteCalendarRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteCalendarRequestDescriptor, DeleteCalendarResponse, DeleteCalendarRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a calendar.
	/// Removes all scheduled events from a calendar, then deletes it.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarResponse> DeleteCalendarAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteCalendarRequestDescriptor(calendarId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteCalendarRequestDescriptor, DeleteCalendarResponse, DeleteCalendarRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a calendar.
	/// Removes all scheduled events from a calendar, then deletes it.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarResponse> DeleteCalendarAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Action<DeleteCalendarRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteCalendarRequestDescriptor(calendarId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteCalendarRequestDescriptor, DeleteCalendarResponse, DeleteCalendarRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete events from a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarEventResponse> DeleteCalendarEventAsync(DeleteCalendarEventRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteCalendarEventRequest, DeleteCalendarEventResponse, DeleteCalendarEventRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete events from a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarEventResponse> DeleteCalendarEventAsync(DeleteCalendarEventRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteCalendarEventRequestDescriptor, DeleteCalendarEventResponse, DeleteCalendarEventRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete events from a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarEventResponse> DeleteCalendarEventAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Id eventId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteCalendarEventRequestDescriptor(calendarId, eventId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteCalendarEventRequestDescriptor, DeleteCalendarEventResponse, DeleteCalendarEventRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete events from a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarEventResponse> DeleteCalendarEventAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Id eventId, Action<DeleteCalendarEventRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteCalendarEventRequestDescriptor(calendarId, eventId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteCalendarEventRequestDescriptor, DeleteCalendarEventResponse, DeleteCalendarEventRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete anomaly jobs from a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarJobResponse> DeleteCalendarJobAsync(DeleteCalendarJobRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteCalendarJobRequest, DeleteCalendarJobResponse, DeleteCalendarJobRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete anomaly jobs from a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarJobResponse> DeleteCalendarJobAsync(DeleteCalendarJobRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteCalendarJobRequestDescriptor, DeleteCalendarJobResponse, DeleteCalendarJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete anomaly jobs from a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarJobResponse> DeleteCalendarJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteCalendarJobRequestDescriptor(calendarId, jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteCalendarJobRequestDescriptor, DeleteCalendarJobResponse, DeleteCalendarJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete anomaly jobs from a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-calendar-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteCalendarJobResponse> DeleteCalendarJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId, Action<DeleteCalendarJobRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteCalendarJobRequestDescriptor(calendarId, jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteCalendarJobRequestDescriptor, DeleteCalendarJobResponse, DeleteCalendarJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a datafeed.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDatafeedResponse> DeleteDatafeedAsync(DeleteDatafeedRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteDatafeedRequest, DeleteDatafeedResponse, DeleteDatafeedRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a datafeed.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDatafeedResponse> DeleteDatafeedAsync(DeleteDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteDatafeedRequestDescriptor, DeleteDatafeedResponse, DeleteDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a datafeed.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDatafeedResponse> DeleteDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteDatafeedRequestDescriptor(datafeedId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteDatafeedRequestDescriptor, DeleteDatafeedResponse, DeleteDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a datafeed.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/ml-delete-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDatafeedResponse> DeleteDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action<DeleteDatafeedRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteDatafeedRequestDescriptor(datafeedId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteDatafeedRequestDescriptor, DeleteDatafeedResponse, DeleteDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDataFrameAnalyticsResponse> DeleteDataFrameAnalyticsAsync(DeleteDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteDataFrameAnalyticsRequest, DeleteDataFrameAnalyticsResponse, DeleteDataFrameAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDataFrameAnalyticsResponse> DeleteDataFrameAnalyticsAsync<TDocument>(DeleteDataFrameAnalyticsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteDataFrameAnalyticsRequestDescriptor<TDocument>, DeleteDataFrameAnalyticsResponse, DeleteDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDataFrameAnalyticsResponse> DeleteDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteDataFrameAnalyticsRequestDescriptor<TDocument>, DeleteDataFrameAnalyticsResponse, DeleteDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDataFrameAnalyticsResponse> DeleteDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<DeleteDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteDataFrameAnalyticsRequestDescriptor<TDocument>, DeleteDataFrameAnalyticsResponse, DeleteDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDataFrameAnalyticsResponse> DeleteDataFrameAnalyticsAsync(DeleteDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteDataFrameAnalyticsRequestDescriptor, DeleteDataFrameAnalyticsResponse, DeleteDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDataFrameAnalyticsResponse> DeleteDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteDataFrameAnalyticsRequestDescriptor(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteDataFrameAnalyticsRequestDescriptor, DeleteDataFrameAnalyticsResponse, DeleteDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/delete-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteDataFrameAnalyticsResponse> DeleteDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<DeleteDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteDataFrameAnalyticsRequestDescriptor(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteDataFrameAnalyticsRequestDescriptor, DeleteDataFrameAnalyticsResponse, DeleteDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete expired ML data.
	/// Deletes all job results, model snapshots and forecast data that have exceeded
	/// their retention days period. Machine learning state documents that are not
	/// associated with any job are also deleted.
	/// You can limit the request to a single or set of anomaly detection jobs by
	/// using a job identifier, a group name, a comma-separated list of jobs, or a
	/// wildcard expression. You can delete expired data for all anomaly detection
	/// jobs by using _all, by specifying * as the &lt;job_id>, or by omitting the
	/// &lt;job_id>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteExpiredDataResponse> DeleteExpiredDataAsync(DeleteExpiredDataRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteExpiredDataRequest, DeleteExpiredDataResponse, DeleteExpiredDataRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete expired ML data.
	/// Deletes all job results, model snapshots and forecast data that have exceeded
	/// their retention days period. Machine learning state documents that are not
	/// associated with any job are also deleted.
	/// You can limit the request to a single or set of anomaly detection jobs by
	/// using a job identifier, a group name, a comma-separated list of jobs, or a
	/// wildcard expression. You can delete expired data for all anomaly detection
	/// jobs by using _all, by specifying * as the &lt;job_id>, or by omitting the
	/// &lt;job_id>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteExpiredDataResponse> DeleteExpiredDataAsync(DeleteExpiredDataRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteExpiredDataRequestDescriptor, DeleteExpiredDataResponse, DeleteExpiredDataRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete expired ML data.
	/// Deletes all job results, model snapshots and forecast data that have exceeded
	/// their retention days period. Machine learning state documents that are not
	/// associated with any job are also deleted.
	/// You can limit the request to a single or set of anomaly detection jobs by
	/// using a job identifier, a group name, a comma-separated list of jobs, or a
	/// wildcard expression. You can delete expired data for all anomaly detection
	/// jobs by using _all, by specifying * as the &lt;job_id>, or by omitting the
	/// &lt;job_id>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteExpiredDataResponse> DeleteExpiredDataAsync(Elastic.Clients.Elasticsearch.Serverless.Id? jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteExpiredDataRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteExpiredDataRequestDescriptor, DeleteExpiredDataResponse, DeleteExpiredDataRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete expired ML data.
	/// Deletes all job results, model snapshots and forecast data that have exceeded
	/// their retention days period. Machine learning state documents that are not
	/// associated with any job are also deleted.
	/// You can limit the request to a single or set of anomaly detection jobs by
	/// using a job identifier, a group name, a comma-separated list of jobs, or a
	/// wildcard expression. You can delete expired data for all anomaly detection
	/// jobs by using _all, by specifying * as the &lt;job_id>, or by omitting the
	/// &lt;job_id>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteExpiredDataResponse> DeleteExpiredDataAsync(Elastic.Clients.Elasticsearch.Serverless.Id? jobId, Action<DeleteExpiredDataRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteExpiredDataRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteExpiredDataRequestDescriptor, DeleteExpiredDataResponse, DeleteExpiredDataRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete expired ML data.
	/// Deletes all job results, model snapshots and forecast data that have exceeded
	/// their retention days period. Machine learning state documents that are not
	/// associated with any job are also deleted.
	/// You can limit the request to a single or set of anomaly detection jobs by
	/// using a job identifier, a group name, a comma-separated list of jobs, or a
	/// wildcard expression. You can delete expired data for all anomaly detection
	/// jobs by using _all, by specifying * as the &lt;job_id>, or by omitting the
	/// &lt;job_id>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteExpiredDataResponse> DeleteExpiredDataAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteExpiredDataRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteExpiredDataRequestDescriptor, DeleteExpiredDataResponse, DeleteExpiredDataRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete expired ML data.
	/// Deletes all job results, model snapshots and forecast data that have exceeded
	/// their retention days period. Machine learning state documents that are not
	/// associated with any job are also deleted.
	/// You can limit the request to a single or set of anomaly detection jobs by
	/// using a job identifier, a group name, a comma-separated list of jobs, or a
	/// wildcard expression. You can delete expired data for all anomaly detection
	/// jobs by using _all, by specifying * as the &lt;job_id>, or by omitting the
	/// &lt;job_id>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteExpiredDataResponse> DeleteExpiredDataAsync(Action<DeleteExpiredDataRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteExpiredDataRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteExpiredDataRequestDescriptor, DeleteExpiredDataResponse, DeleteExpiredDataRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a filter.
	/// If an anomaly detection job references the filter, you cannot delete the
	/// filter. You must update or delete the job before you can delete the filter.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteFilterResponse> DeleteFilterAsync(DeleteFilterRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteFilterRequest, DeleteFilterResponse, DeleteFilterRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a filter.
	/// If an anomaly detection job references the filter, you cannot delete the
	/// filter. You must update or delete the job before you can delete the filter.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteFilterResponse> DeleteFilterAsync(DeleteFilterRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteFilterRequestDescriptor, DeleteFilterResponse, DeleteFilterRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a filter.
	/// If an anomaly detection job references the filter, you cannot delete the
	/// filter. You must update or delete the job before you can delete the filter.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteFilterResponse> DeleteFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteFilterRequestDescriptor(filterId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteFilterRequestDescriptor, DeleteFilterResponse, DeleteFilterRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a filter.
	/// If an anomaly detection job references the filter, you cannot delete the
	/// filter. You must update or delete the job before you can delete the filter.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteFilterResponse> DeleteFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, Action<DeleteFilterRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteFilterRequestDescriptor(filterId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteFilterRequestDescriptor, DeleteFilterResponse, DeleteFilterRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete forecasts from a job.
	/// By default, forecasts are retained for 14 days. You can specify a
	/// different retention period with the <c>expires_in</c> parameter in the forecast
	/// jobs API. The delete forecast API enables you to delete one or more
	/// forecasts before they expire.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteForecastResponse> DeleteForecastAsync(DeleteForecastRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteForecastRequest, DeleteForecastResponse, DeleteForecastRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete forecasts from a job.
	/// By default, forecasts are retained for 14 days. You can specify a
	/// different retention period with the <c>expires_in</c> parameter in the forecast
	/// jobs API. The delete forecast API enables you to delete one or more
	/// forecasts before they expire.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteForecastResponse> DeleteForecastAsync(DeleteForecastRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteForecastRequestDescriptor, DeleteForecastResponse, DeleteForecastRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete forecasts from a job.
	/// By default, forecasts are retained for 14 days. You can specify a
	/// different retention period with the <c>expires_in</c> parameter in the forecast
	/// jobs API. The delete forecast API enables you to delete one or more
	/// forecasts before they expire.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteForecastResponse> DeleteForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? forecastId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteForecastRequestDescriptor(jobId, forecastId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteForecastRequestDescriptor, DeleteForecastResponse, DeleteForecastRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete forecasts from a job.
	/// By default, forecasts are retained for 14 days. You can specify a
	/// different retention period with the <c>expires_in</c> parameter in the forecast
	/// jobs API. The delete forecast API enables you to delete one or more
	/// forecasts before they expire.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteForecastResponse> DeleteForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? forecastId, Action<DeleteForecastRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteForecastRequestDescriptor(jobId, forecastId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteForecastRequestDescriptor, DeleteForecastResponse, DeleteForecastRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete forecasts from a job.
	/// By default, forecasts are retained for 14 days. You can specify a
	/// different retention period with the <c>expires_in</c> parameter in the forecast
	/// jobs API. The delete forecast API enables you to delete one or more
	/// forecasts before they expire.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteForecastResponse> DeleteForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteForecastRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteForecastRequestDescriptor, DeleteForecastResponse, DeleteForecastRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete forecasts from a job.
	/// By default, forecasts are retained for 14 days. You can specify a
	/// different retention period with the <c>expires_in</c> parameter in the forecast
	/// jobs API. The delete forecast API enables you to delete one or more
	/// forecasts before they expire.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteForecastResponse> DeleteForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<DeleteForecastRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteForecastRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteForecastRequestDescriptor, DeleteForecastResponse, DeleteForecastRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete an anomaly detection job.
	/// All job configuration, model state and results are deleted.
	/// It is not currently possible to delete multiple jobs using wildcards or a
	/// comma separated list. If you delete a job that has a datafeed, the request
	/// first tries to delete the datafeed. This behavior is equivalent to calling
	/// the delete datafeed API with the same timeout and force parameters as the
	/// delete job request.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteJobResponse> DeleteJobAsync(DeleteJobRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteJobRequest, DeleteJobResponse, DeleteJobRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete an anomaly detection job.
	/// All job configuration, model state and results are deleted.
	/// It is not currently possible to delete multiple jobs using wildcards or a
	/// comma separated list. If you delete a job that has a datafeed, the request
	/// first tries to delete the datafeed. This behavior is equivalent to calling
	/// the delete datafeed API with the same timeout and force parameters as the
	/// delete job request.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteJobResponse> DeleteJobAsync(DeleteJobRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteJobRequestDescriptor, DeleteJobResponse, DeleteJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete an anomaly detection job.
	/// All job configuration, model state and results are deleted.
	/// It is not currently possible to delete multiple jobs using wildcards or a
	/// comma separated list. If you delete a job that has a datafeed, the request
	/// first tries to delete the datafeed. This behavior is equivalent to calling
	/// the delete datafeed API with the same timeout and force parameters as the
	/// delete job request.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteJobResponse> DeleteJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteJobRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteJobRequestDescriptor, DeleteJobResponse, DeleteJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete an anomaly detection job.
	/// All job configuration, model state and results are deleted.
	/// It is not currently possible to delete multiple jobs using wildcards or a
	/// comma separated list. If you delete a job that has a datafeed, the request
	/// first tries to delete the datafeed. This behavior is equivalent to calling
	/// the delete datafeed API with the same timeout and force parameters as the
	/// delete job request.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteJobResponse> DeleteJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<DeleteJobRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteJobRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteJobRequestDescriptor, DeleteJobResponse, DeleteJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a model snapshot.
	/// You cannot delete the active model snapshot. To delete that snapshot, first
	/// revert to a different one. To identify the active model snapshot, refer to
	/// the <c>model_snapshot_id</c> in the results from the get jobs API.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteModelSnapshotResponse> DeleteModelSnapshotAsync(DeleteModelSnapshotRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteModelSnapshotRequest, DeleteModelSnapshotResponse, DeleteModelSnapshotRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a model snapshot.
	/// You cannot delete the active model snapshot. To delete that snapshot, first
	/// revert to a different one. To identify the active model snapshot, refer to
	/// the <c>model_snapshot_id</c> in the results from the get jobs API.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteModelSnapshotResponse> DeleteModelSnapshotAsync(DeleteModelSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteModelSnapshotRequestDescriptor, DeleteModelSnapshotResponse, DeleteModelSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a model snapshot.
	/// You cannot delete the active model snapshot. To delete that snapshot, first
	/// revert to a different one. To identify the active model snapshot, refer to
	/// the <c>model_snapshot_id</c> in the results from the get jobs API.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteModelSnapshotResponse> DeleteModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteModelSnapshotRequestDescriptor(jobId, snapshotId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteModelSnapshotRequestDescriptor, DeleteModelSnapshotResponse, DeleteModelSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a model snapshot.
	/// You cannot delete the active model snapshot. To delete that snapshot, first
	/// revert to a different one. To identify the active model snapshot, refer to
	/// the <c>model_snapshot_id</c> in the results from the get jobs API.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteModelSnapshotResponse> DeleteModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, Action<DeleteModelSnapshotRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteModelSnapshotRequestDescriptor(jobId, snapshotId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteModelSnapshotRequestDescriptor, DeleteModelSnapshotResponse, DeleteModelSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete an unreferenced trained model.
	/// The request deletes a trained inference model that is not referenced by an ingest pipeline.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteTrainedModelResponse> DeleteTrainedModelAsync(DeleteTrainedModelRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteTrainedModelRequest, DeleteTrainedModelResponse, DeleteTrainedModelRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete an unreferenced trained model.
	/// The request deletes a trained inference model that is not referenced by an ingest pipeline.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteTrainedModelResponse> DeleteTrainedModelAsync(DeleteTrainedModelRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteTrainedModelRequestDescriptor, DeleteTrainedModelResponse, DeleteTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete an unreferenced trained model.
	/// The request deletes a trained inference model that is not referenced by an ingest pipeline.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteTrainedModelResponse> DeleteTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteTrainedModelRequestDescriptor(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteTrainedModelRequestDescriptor, DeleteTrainedModelResponse, DeleteTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete an unreferenced trained model.
	/// The request deletes a trained inference model that is not referenced by an ingest pipeline.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteTrainedModelResponse> DeleteTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action<DeleteTrainedModelRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteTrainedModelRequestDescriptor(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteTrainedModelRequestDescriptor, DeleteTrainedModelResponse, DeleteTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a trained model alias.
	/// This API deletes an existing model alias that refers to a trained model. If
	/// the model alias is missing or refers to a model other than the one identified
	/// by the <c>model_id</c>, this API returns an error.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteTrainedModelAliasResponse> DeleteTrainedModelAliasAsync(DeleteTrainedModelAliasRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteTrainedModelAliasRequest, DeleteTrainedModelAliasResponse, DeleteTrainedModelAliasRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a trained model alias.
	/// This API deletes an existing model alias that refers to a trained model. If
	/// the model alias is missing or refers to a model other than the one identified
	/// by the <c>model_id</c>, this API returns an error.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteTrainedModelAliasResponse> DeleteTrainedModelAliasAsync(DeleteTrainedModelAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteTrainedModelAliasRequestDescriptor, DeleteTrainedModelAliasResponse, DeleteTrainedModelAliasRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a trained model alias.
	/// This API deletes an existing model alias that refers to a trained model. If
	/// the model alias is missing or refers to a model other than the one identified
	/// by the <c>model_id</c>, this API returns an error.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteTrainedModelAliasResponse> DeleteTrainedModelAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteTrainedModelAliasRequestDescriptor(modelId, modelAlias);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteTrainedModelAliasRequestDescriptor, DeleteTrainedModelAliasResponse, DeleteTrainedModelAliasRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Delete a trained model alias.
	/// This API deletes an existing model alias that refers to a trained model. If
	/// the model alias is missing or refers to a model other than the one identified
	/// by the <c>model_id</c>, this API returns an error.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteTrainedModelAliasResponse> DeleteTrainedModelAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias, Action<DeleteTrainedModelAliasRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteTrainedModelAliasRequestDescriptor(modelId, modelAlias);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteTrainedModelAliasRequestDescriptor, DeleteTrainedModelAliasResponse, DeleteTrainedModelAliasRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Estimate job model memory usage.
	/// Makes an estimation of the memory usage for an anomaly detection job model.
	/// It is based on analysis configuration details for the job and cardinality
	/// estimates for the fields it references.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EstimateModelMemoryResponse> EstimateModelMemoryAsync(EstimateModelMemoryRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<EstimateModelMemoryRequest, EstimateModelMemoryResponse, EstimateModelMemoryRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Estimate job model memory usage.
	/// Makes an estimation of the memory usage for an anomaly detection job model.
	/// It is based on analysis configuration details for the job and cardinality
	/// estimates for the fields it references.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EstimateModelMemoryResponse> EstimateModelMemoryAsync<TDocument>(EstimateModelMemoryRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<EstimateModelMemoryRequestDescriptor<TDocument>, EstimateModelMemoryResponse, EstimateModelMemoryRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Estimate job model memory usage.
	/// Makes an estimation of the memory usage for an anomaly detection job model.
	/// It is based on analysis configuration details for the job and cardinality
	/// estimates for the fields it references.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EstimateModelMemoryResponse> EstimateModelMemoryAsync<TDocument>(CancellationToken cancellationToken = default)
	{
		var descriptor = new EstimateModelMemoryRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequestAsync<EstimateModelMemoryRequestDescriptor<TDocument>, EstimateModelMemoryResponse, EstimateModelMemoryRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Estimate job model memory usage.
	/// Makes an estimation of the memory usage for an anomaly detection job model.
	/// It is based on analysis configuration details for the job and cardinality
	/// estimates for the fields it references.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EstimateModelMemoryResponse> EstimateModelMemoryAsync<TDocument>(Action<EstimateModelMemoryRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new EstimateModelMemoryRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<EstimateModelMemoryRequestDescriptor<TDocument>, EstimateModelMemoryResponse, EstimateModelMemoryRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Estimate job model memory usage.
	/// Makes an estimation of the memory usage for an anomaly detection job model.
	/// It is based on analysis configuration details for the job and cardinality
	/// estimates for the fields it references.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EstimateModelMemoryResponse> EstimateModelMemoryAsync(EstimateModelMemoryRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<EstimateModelMemoryRequestDescriptor, EstimateModelMemoryResponse, EstimateModelMemoryRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Estimate job model memory usage.
	/// Makes an estimation of the memory usage for an anomaly detection job model.
	/// It is based on analysis configuration details for the job and cardinality
	/// estimates for the fields it references.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EstimateModelMemoryResponse> EstimateModelMemoryAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new EstimateModelMemoryRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<EstimateModelMemoryRequestDescriptor, EstimateModelMemoryResponse, EstimateModelMemoryRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Estimate job model memory usage.
	/// Makes an estimation of the memory usage for an anomaly detection job model.
	/// It is based on analysis configuration details for the job and cardinality
	/// estimates for the fields it references.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EstimateModelMemoryResponse> EstimateModelMemoryAsync(Action<EstimateModelMemoryRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new EstimateModelMemoryRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<EstimateModelMemoryRequestDescriptor, EstimateModelMemoryResponse, EstimateModelMemoryRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate data frame analytics.
	/// The API packages together commonly used evaluation metrics for various types
	/// of machine learning features. This has been designed for use on indexes
	/// created by data frame analytics. Evaluation requires both a ground truth
	/// field and an analytics result field to be present.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EvaluateDataFrameResponse> EvaluateDataFrameAsync(EvaluateDataFrameRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<EvaluateDataFrameRequest, EvaluateDataFrameResponse, EvaluateDataFrameRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate data frame analytics.
	/// The API packages together commonly used evaluation metrics for various types
	/// of machine learning features. This has been designed for use on indexes
	/// created by data frame analytics. Evaluation requires both a ground truth
	/// field and an analytics result field to be present.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EvaluateDataFrameResponse> EvaluateDataFrameAsync<TDocument>(EvaluateDataFrameRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<EvaluateDataFrameRequestDescriptor<TDocument>, EvaluateDataFrameResponse, EvaluateDataFrameRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate data frame analytics.
	/// The API packages together commonly used evaluation metrics for various types
	/// of machine learning features. This has been designed for use on indexes
	/// created by data frame analytics. Evaluation requires both a ground truth
	/// field and an analytics result field to be present.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EvaluateDataFrameResponse> EvaluateDataFrameAsync<TDocument>(CancellationToken cancellationToken = default)
	{
		var descriptor = new EvaluateDataFrameRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequestAsync<EvaluateDataFrameRequestDescriptor<TDocument>, EvaluateDataFrameResponse, EvaluateDataFrameRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate data frame analytics.
	/// The API packages together commonly used evaluation metrics for various types
	/// of machine learning features. This has been designed for use on indexes
	/// created by data frame analytics. Evaluation requires both a ground truth
	/// field and an analytics result field to be present.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EvaluateDataFrameResponse> EvaluateDataFrameAsync<TDocument>(Action<EvaluateDataFrameRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new EvaluateDataFrameRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<EvaluateDataFrameRequestDescriptor<TDocument>, EvaluateDataFrameResponse, EvaluateDataFrameRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate data frame analytics.
	/// The API packages together commonly used evaluation metrics for various types
	/// of machine learning features. This has been designed for use on indexes
	/// created by data frame analytics. Evaluation requires both a ground truth
	/// field and an analytics result field to be present.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EvaluateDataFrameResponse> EvaluateDataFrameAsync(EvaluateDataFrameRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<EvaluateDataFrameRequestDescriptor, EvaluateDataFrameResponse, EvaluateDataFrameRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate data frame analytics.
	/// The API packages together commonly used evaluation metrics for various types
	/// of machine learning features. This has been designed for use on indexes
	/// created by data frame analytics. Evaluation requires both a ground truth
	/// field and an analytics result field to be present.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EvaluateDataFrameResponse> EvaluateDataFrameAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new EvaluateDataFrameRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<EvaluateDataFrameRequestDescriptor, EvaluateDataFrameResponse, EvaluateDataFrameRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate data frame analytics.
	/// The API packages together commonly used evaluation metrics for various types
	/// of machine learning features. This has been designed for use on indexes
	/// created by data frame analytics. Evaluation requires both a ground truth
	/// field and an analytics result field to be present.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<EvaluateDataFrameResponse> EvaluateDataFrameAsync(Action<EvaluateDataFrameRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new EvaluateDataFrameRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<EvaluateDataFrameRequestDescriptor, EvaluateDataFrameResponse, EvaluateDataFrameRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync(ExplainDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequest, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync<TDocument>(ExplainDataFrameAnalyticsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequestDescriptor<TDocument>, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default)
	{
		var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequestDescriptor<TDocument>, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action<ExplainDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequestDescriptor<TDocument>, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync<TDocument>(CancellationToken cancellationToken = default)
	{
		var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequestDescriptor<TDocument>, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync<TDocument>(Action<ExplainDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequestDescriptor<TDocument>, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync(ExplainDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequestDescriptor, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default)
	{
		var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequestDescriptor, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action<ExplainDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequestDescriptor, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequestDescriptor, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Explain data frame analytics config.
	/// This API provides explanations for a data frame analytics config that either
	/// exists already or one that has not been created yet. The following
	/// explanations are provided:
	/// </para>
	/// <list type="bullet">
	/// <item>
	/// <para>
	/// which fields are included or not in the analysis and why,
	/// </para>
	/// </item>
	/// <item>
	/// <para>
	/// how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for model_memory_limit setting later on.
	/// If you have object fields or fields that are excluded via source filtering, they are not included in the explanation.
	/// </para>
	/// </item>
	/// </list>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExplainDataFrameAnalyticsResponse> ExplainDataFrameAnalyticsAsync(Action<ExplainDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ExplainDataFrameAnalyticsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ExplainDataFrameAnalyticsRequestDescriptor, ExplainDataFrameAnalyticsResponse, ExplainDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Force buffered data to be processed.
	/// The flush jobs API is only applicable when sending data for analysis using
	/// the post data API. Depending on the content of the buffer, then it might
	/// additionally calculate new results. Both flush and close operations are
	/// similar, however the flush is more efficient if you are expecting to send
	/// more data for analysis. When flushing, the job remains open and is available
	/// to continue analyzing data. A close operation additionally prunes and
	/// persists the model state to disk and the job must be opened again before
	/// analyzing further data.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<FlushJobResponse> FlushJobAsync(FlushJobRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<FlushJobRequest, FlushJobResponse, FlushJobRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Force buffered data to be processed.
	/// The flush jobs API is only applicable when sending data for analysis using
	/// the post data API. Depending on the content of the buffer, then it might
	/// additionally calculate new results. Both flush and close operations are
	/// similar, however the flush is more efficient if you are expecting to send
	/// more data for analysis. When flushing, the job remains open and is available
	/// to continue analyzing data. A close operation additionally prunes and
	/// persists the model state to disk and the job must be opened again before
	/// analyzing further data.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<FlushJobResponse> FlushJobAsync(FlushJobRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<FlushJobRequestDescriptor, FlushJobResponse, FlushJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Force buffered data to be processed.
	/// The flush jobs API is only applicable when sending data for analysis using
	/// the post data API. Depending on the content of the buffer, then it might
	/// additionally calculate new results. Both flush and close operations are
	/// similar, however the flush is more efficient if you are expecting to send
	/// more data for analysis. When flushing, the job remains open and is available
	/// to continue analyzing data. A close operation additionally prunes and
	/// persists the model state to disk and the job must be opened again before
	/// analyzing further data.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<FlushJobResponse> FlushJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new FlushJobRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<FlushJobRequestDescriptor, FlushJobResponse, FlushJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Force buffered data to be processed.
	/// The flush jobs API is only applicable when sending data for analysis using
	/// the post data API. Depending on the content of the buffer, then it might
	/// additionally calculate new results. Both flush and close operations are
	/// similar, however the flush is more efficient if you are expecting to send
	/// more data for analysis. When flushing, the job remains open and is available
	/// to continue analyzing data. A close operation additionally prunes and
	/// persists the model state to disk and the job must be opened again before
	/// analyzing further data.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<FlushJobResponse> FlushJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<FlushJobRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new FlushJobRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<FlushJobRequestDescriptor, FlushJobResponse, FlushJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Predict future behavior of a time series.
	/// </para>
	/// <para>
	/// Forecasts are not supported for jobs that perform population analysis; an
	/// error occurs if you try to create a forecast for a job that has an
	/// <c>over_field_name</c> in its configuration. Forcasts predict future behavior
	/// based on historical data.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ForecastResponse> ForecastAsync(ForecastRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ForecastRequest, ForecastResponse, ForecastRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Predict future behavior of a time series.
	/// </para>
	/// <para>
	/// Forecasts are not supported for jobs that perform population analysis; an
	/// error occurs if you try to create a forecast for a job that has an
	/// <c>over_field_name</c> in its configuration. Forcasts predict future behavior
	/// based on historical data.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ForecastResponse> ForecastAsync(ForecastRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ForecastRequestDescriptor, ForecastResponse, ForecastRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Predict future behavior of a time series.
	/// </para>
	/// <para>
	/// Forecasts are not supported for jobs that perform population analysis; an
	/// error occurs if you try to create a forecast for a job that has an
	/// <c>over_field_name</c> in its configuration. Forcasts predict future behavior
	/// based on historical data.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ForecastResponse> ForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new ForecastRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<ForecastRequestDescriptor, ForecastResponse, ForecastRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Predict future behavior of a time series.
	/// </para>
	/// <para>
	/// Forecasts are not supported for jobs that perform population analysis; an
	/// error occurs if you try to create a forecast for a job that has an
	/// <c>over_field_name</c> in its configuration. Forcasts predict future behavior
	/// based on historical data.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ForecastResponse> ForecastAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<ForecastRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ForecastRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ForecastRequestDescriptor, ForecastResponse, ForecastRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync(GetBucketsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetBucketsRequest, GetBucketsResponse, GetBucketsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync<TDocument>(GetBucketsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBucketsRequestDescriptor<TDocument>, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBucketsRequestDescriptor<TDocument>(jobId, timestamp);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBucketsRequestDescriptor<TDocument>, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp, Action<GetBucketsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBucketsRequestDescriptor<TDocument>(jobId, timestamp);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBucketsRequestDescriptor<TDocument>, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBucketsRequestDescriptor<TDocument>(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBucketsRequestDescriptor<TDocument>, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<GetBucketsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBucketsRequestDescriptor<TDocument>(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBucketsRequestDescriptor<TDocument>, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync(GetBucketsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBucketsRequestDescriptor, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBucketsRequestDescriptor(jobId, timestamp);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBucketsRequestDescriptor, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, DateTimeOffset? timestamp, Action<GetBucketsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBucketsRequestDescriptor(jobId, timestamp);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBucketsRequestDescriptor, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBucketsRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBucketsRequestDescriptor, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for buckets.
	/// The API presents a chronological view of the records, grouped by bucket.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetBucketsResponse> GetBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<GetBucketsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetBucketsRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetBucketsRequestDescriptor, GetBucketsResponse, GetBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get info about events in calendars.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCalendarEventsResponse> GetCalendarEventsAsync(GetCalendarEventsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetCalendarEventsRequest, GetCalendarEventsResponse, GetCalendarEventsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get info about events in calendars.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCalendarEventsResponse> GetCalendarEventsAsync(GetCalendarEventsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCalendarEventsRequestDescriptor, GetCalendarEventsResponse, GetCalendarEventsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get info about events in calendars.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCalendarEventsResponse> GetCalendarEventsAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetCalendarEventsRequestDescriptor(calendarId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCalendarEventsRequestDescriptor, GetCalendarEventsResponse, GetCalendarEventsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get info about events in calendars.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCalendarEventsResponse> GetCalendarEventsAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Action<GetCalendarEventsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetCalendarEventsRequestDescriptor(calendarId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCalendarEventsRequestDescriptor, GetCalendarEventsResponse, GetCalendarEventsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get calendar configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCalendarsResponse> GetCalendarsAsync(GetCalendarsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetCalendarsRequest, GetCalendarsResponse, GetCalendarsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get calendar configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCalendarsResponse> GetCalendarsAsync(GetCalendarsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCalendarsRequestDescriptor, GetCalendarsResponse, GetCalendarsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get calendar configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCalendarsResponse> GetCalendarsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? calendarId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetCalendarsRequestDescriptor(calendarId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCalendarsRequestDescriptor, GetCalendarsResponse, GetCalendarsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get calendar configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCalendarsResponse> GetCalendarsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? calendarId, Action<GetCalendarsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetCalendarsRequestDescriptor(calendarId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCalendarsRequestDescriptor, GetCalendarsResponse, GetCalendarsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get calendar configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCalendarsResponse> GetCalendarsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetCalendarsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCalendarsRequestDescriptor, GetCalendarsResponse, GetCalendarsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get calendar configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCalendarsResponse> GetCalendarsAsync(Action<GetCalendarsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetCalendarsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCalendarsRequestDescriptor, GetCalendarsResponse, GetCalendarsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for categories.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCategoriesResponse> GetCategoriesAsync(GetCategoriesRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetCategoriesRequest, GetCategoriesResponse, GetCategoriesRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for categories.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCategoriesResponse> GetCategoriesAsync(GetCategoriesRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCategoriesRequestDescriptor, GetCategoriesResponse, GetCategoriesRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for categories.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCategoriesResponse> GetCategoriesAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, string? categoryId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetCategoriesRequestDescriptor(jobId, categoryId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCategoriesRequestDescriptor, GetCategoriesResponse, GetCategoriesRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for categories.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCategoriesResponse> GetCategoriesAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, string? categoryId, Action<GetCategoriesRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetCategoriesRequestDescriptor(jobId, categoryId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCategoriesRequestDescriptor, GetCategoriesResponse, GetCategoriesRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for categories.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCategoriesResponse> GetCategoriesAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetCategoriesRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCategoriesRequestDescriptor, GetCategoriesResponse, GetCategoriesRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for categories.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetCategoriesResponse> GetCategoriesAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<GetCategoriesRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetCategoriesRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetCategoriesRequestDescriptor, GetCategoriesResponse, GetCategoriesRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds configuration info.
	/// You can get information for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get information for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedsResponse> GetDatafeedsAsync(GetDatafeedsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetDatafeedsRequest, GetDatafeedsResponse, GetDatafeedsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds configuration info.
	/// You can get information for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get information for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedsResponse> GetDatafeedsAsync(GetDatafeedsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDatafeedsRequestDescriptor, GetDatafeedsResponse, GetDatafeedsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds configuration info.
	/// You can get information for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get information for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedsResponse> GetDatafeedsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDatafeedsRequestDescriptor(datafeedId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDatafeedsRequestDescriptor, GetDatafeedsResponse, GetDatafeedsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds configuration info.
	/// You can get information for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get information for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedsResponse> GetDatafeedsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId, Action<GetDatafeedsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDatafeedsRequestDescriptor(datafeedId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDatafeedsRequestDescriptor, GetDatafeedsResponse, GetDatafeedsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds configuration info.
	/// You can get information for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get information for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedsResponse> GetDatafeedsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDatafeedsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDatafeedsRequestDescriptor, GetDatafeedsResponse, GetDatafeedsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds configuration info.
	/// You can get information for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get information for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedsResponse> GetDatafeedsAsync(Action<GetDatafeedsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDatafeedsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDatafeedsRequestDescriptor, GetDatafeedsResponse, GetDatafeedsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds usage info.
	/// You can get statistics for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get statistics for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>. If the datafeed is stopped, the
	/// only information you receive is the <c>datafeed_id</c> and the <c>state</c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedStatsResponse> GetDatafeedStatsAsync(GetDatafeedStatsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetDatafeedStatsRequest, GetDatafeedStatsResponse, GetDatafeedStatsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds usage info.
	/// You can get statistics for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get statistics for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>. If the datafeed is stopped, the
	/// only information you receive is the <c>datafeed_id</c> and the <c>state</c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedStatsResponse> GetDatafeedStatsAsync(GetDatafeedStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDatafeedStatsRequestDescriptor, GetDatafeedStatsResponse, GetDatafeedStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds usage info.
	/// You can get statistics for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get statistics for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>. If the datafeed is stopped, the
	/// only information you receive is the <c>datafeed_id</c> and the <c>state</c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedStatsResponse> GetDatafeedStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDatafeedStatsRequestDescriptor(datafeedId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDatafeedStatsRequestDescriptor, GetDatafeedStatsResponse, GetDatafeedStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds usage info.
	/// You can get statistics for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get statistics for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>. If the datafeed is stopped, the
	/// only information you receive is the <c>datafeed_id</c> and the <c>state</c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedStatsResponse> GetDatafeedStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? datafeedId, Action<GetDatafeedStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDatafeedStatsRequestDescriptor(datafeedId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDatafeedStatsRequestDescriptor, GetDatafeedStatsResponse, GetDatafeedStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds usage info.
	/// You can get statistics for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get statistics for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>. If the datafeed is stopped, the
	/// only information you receive is the <c>datafeed_id</c> and the <c>state</c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedStatsResponse> GetDatafeedStatsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDatafeedStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDatafeedStatsRequestDescriptor, GetDatafeedStatsResponse, GetDatafeedStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get datafeeds usage info.
	/// You can get statistics for multiple datafeeds in a single API request by
	/// using a comma-separated list of datafeeds or a wildcard expression. You can
	/// get statistics for all datafeeds by using <c>_all</c>, by specifying <c>*</c> as the
	/// <c>&lt;feed_id></c>, or by omitting the <c>&lt;feed_id></c>. If the datafeed is stopped, the
	/// only information you receive is the <c>datafeed_id</c> and the <c>state</c>.
	/// This API returns a maximum of 10,000 datafeeds.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDatafeedStatsResponse> GetDatafeedStatsAsync(Action<GetDatafeedStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDatafeedStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDatafeedStatsRequestDescriptor, GetDatafeedStatsResponse, GetDatafeedStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync(GetDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequest, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync<TDocument>(GetDataFrameAnalyticsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequestDescriptor<TDocument>, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequestDescriptor<TDocument>, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action<GetDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequestDescriptor<TDocument>, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync<TDocument>(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequestDescriptor<TDocument>, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync<TDocument>(Action<GetDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequestDescriptor<TDocument>, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync(GetDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequestDescriptor, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsRequestDescriptor(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequestDescriptor, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action<GetDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsRequestDescriptor(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequestDescriptor, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequestDescriptor, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics job configuration info.
	/// You can get information for multiple data frame analytics jobs in a single
	/// API request by using a comma-separated list of data frame analytics jobs or a
	/// wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsResponse> GetDataFrameAnalyticsAsync(Action<GetDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsRequestDescriptor, GetDataFrameAnalyticsResponse, GetDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync(GetDataFrameAnalyticsStatsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequest, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync<TDocument>(GetDataFrameAnalyticsStatsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action<GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync<TDocument>(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync<TDocument>(Action<GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequestDescriptor<TDocument>, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync(GetDataFrameAnalyticsStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequestDescriptor, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequestDescriptor, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action<GetDataFrameAnalyticsStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequestDescriptor, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequestDescriptor, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get data frame analytics jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetDataFrameAnalyticsStatsResponse> GetDataFrameAnalyticsStatsAsync(Action<GetDataFrameAnalyticsStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetDataFrameAnalyticsStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetDataFrameAnalyticsStatsRequestDescriptor, GetDataFrameAnalyticsStatsResponse, GetDataFrameAnalyticsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get filters.
	/// You can get a single filter or all filters.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetFiltersResponse> GetFiltersAsync(GetFiltersRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetFiltersRequest, GetFiltersResponse, GetFiltersRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get filters.
	/// You can get a single filter or all filters.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetFiltersResponse> GetFiltersAsync(GetFiltersRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetFiltersRequestDescriptor, GetFiltersResponse, GetFiltersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get filters.
	/// You can get a single filter or all filters.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetFiltersResponse> GetFiltersAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? filterId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetFiltersRequestDescriptor(filterId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetFiltersRequestDescriptor, GetFiltersResponse, GetFiltersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get filters.
	/// You can get a single filter or all filters.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetFiltersResponse> GetFiltersAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? filterId, Action<GetFiltersRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetFiltersRequestDescriptor(filterId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetFiltersRequestDescriptor, GetFiltersResponse, GetFiltersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get filters.
	/// You can get a single filter or all filters.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetFiltersResponse> GetFiltersAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetFiltersRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetFiltersRequestDescriptor, GetFiltersResponse, GetFiltersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get filters.
	/// You can get a single filter or all filters.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetFiltersResponse> GetFiltersAsync(Action<GetFiltersRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetFiltersRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetFiltersRequestDescriptor, GetFiltersResponse, GetFiltersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for influencers.
	/// Influencers are the entities that have contributed to, or are to blame for,
	/// the anomalies. Influencer results are available only if an
	/// <c>influencer_field_name</c> is specified in the job configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetInfluencersResponse> GetInfluencersAsync(GetInfluencersRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetInfluencersRequest, GetInfluencersResponse, GetInfluencersRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for influencers.
	/// Influencers are the entities that have contributed to, or are to blame for,
	/// the anomalies. Influencer results are available only if an
	/// <c>influencer_field_name</c> is specified in the job configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetInfluencersResponse> GetInfluencersAsync<TDocument>(GetInfluencersRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetInfluencersRequestDescriptor<TDocument>, GetInfluencersResponse, GetInfluencersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for influencers.
	/// Influencers are the entities that have contributed to, or are to blame for,
	/// the anomalies. Influencer results are available only if an
	/// <c>influencer_field_name</c> is specified in the job configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetInfluencersResponse> GetInfluencersAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetInfluencersRequestDescriptor<TDocument>(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetInfluencersRequestDescriptor<TDocument>, GetInfluencersResponse, GetInfluencersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for influencers.
	/// Influencers are the entities that have contributed to, or are to blame for,
	/// the anomalies. Influencer results are available only if an
	/// <c>influencer_field_name</c> is specified in the job configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetInfluencersResponse> GetInfluencersAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<GetInfluencersRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetInfluencersRequestDescriptor<TDocument>(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetInfluencersRequestDescriptor<TDocument>, GetInfluencersResponse, GetInfluencersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for influencers.
	/// Influencers are the entities that have contributed to, or are to blame for,
	/// the anomalies. Influencer results are available only if an
	/// <c>influencer_field_name</c> is specified in the job configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetInfluencersResponse> GetInfluencersAsync(GetInfluencersRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetInfluencersRequestDescriptor, GetInfluencersResponse, GetInfluencersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for influencers.
	/// Influencers are the entities that have contributed to, or are to blame for,
	/// the anomalies. Influencer results are available only if an
	/// <c>influencer_field_name</c> is specified in the job configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetInfluencersResponse> GetInfluencersAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetInfluencersRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetInfluencersRequestDescriptor, GetInfluencersResponse, GetInfluencersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job results for influencers.
	/// Influencers are the entities that have contributed to, or are to blame for,
	/// the anomalies. Influencer results are available only if an
	/// <c>influencer_field_name</c> is specified in the job configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetInfluencersResponse> GetInfluencersAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<GetInfluencersRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetInfluencersRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetInfluencersRequestDescriptor, GetInfluencersResponse, GetInfluencersRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs configuration info.
	/// You can get information for multiple anomaly detection jobs in a single API
	/// request by using a group name, a comma-separated list of jobs, or a wildcard
	/// expression. You can get information for all anomaly detection jobs by using
	/// <c>_all</c>, by specifying <c>*</c> as the <c>&lt;job_id></c>, or by omitting the <c>&lt;job_id></c>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobsResponse> GetJobsAsync(GetJobsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetJobsRequest, GetJobsResponse, GetJobsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs configuration info.
	/// You can get information for multiple anomaly detection jobs in a single API
	/// request by using a group name, a comma-separated list of jobs, or a wildcard
	/// expression. You can get information for all anomaly detection jobs by using
	/// <c>_all</c>, by specifying <c>*</c> as the <c>&lt;job_id></c>, or by omitting the <c>&lt;job_id></c>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobsResponse> GetJobsAsync(GetJobsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetJobsRequestDescriptor, GetJobsResponse, GetJobsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs configuration info.
	/// You can get information for multiple anomaly detection jobs in a single API
	/// request by using a group name, a comma-separated list of jobs, or a wildcard
	/// expression. You can get information for all anomaly detection jobs by using
	/// <c>_all</c>, by specifying <c>*</c> as the <c>&lt;job_id></c>, or by omitting the <c>&lt;job_id></c>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobsResponse> GetJobsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetJobsRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetJobsRequestDescriptor, GetJobsResponse, GetJobsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs configuration info.
	/// You can get information for multiple anomaly detection jobs in a single API
	/// request by using a group name, a comma-separated list of jobs, or a wildcard
	/// expression. You can get information for all anomaly detection jobs by using
	/// <c>_all</c>, by specifying <c>*</c> as the <c>&lt;job_id></c>, or by omitting the <c>&lt;job_id></c>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobsResponse> GetJobsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? jobId, Action<GetJobsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetJobsRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetJobsRequestDescriptor, GetJobsResponse, GetJobsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs configuration info.
	/// You can get information for multiple anomaly detection jobs in a single API
	/// request by using a group name, a comma-separated list of jobs, or a wildcard
	/// expression. You can get information for all anomaly detection jobs by using
	/// <c>_all</c>, by specifying <c>*</c> as the <c>&lt;job_id></c>, or by omitting the <c>&lt;job_id></c>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobsResponse> GetJobsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetJobsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetJobsRequestDescriptor, GetJobsResponse, GetJobsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs configuration info.
	/// You can get information for multiple anomaly detection jobs in a single API
	/// request by using a group name, a comma-separated list of jobs, or a wildcard
	/// expression. You can get information for all anomaly detection jobs by using
	/// <c>_all</c>, by specifying <c>*</c> as the <c>&lt;job_id></c>, or by omitting the <c>&lt;job_id></c>.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobsResponse> GetJobsAsync(Action<GetJobsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetJobsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetJobsRequestDescriptor, GetJobsResponse, GetJobsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobStatsResponse> GetJobStatsAsync(GetJobStatsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetJobStatsRequest, GetJobStatsResponse, GetJobStatsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobStatsResponse> GetJobStatsAsync(GetJobStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetJobStatsRequestDescriptor, GetJobStatsResponse, GetJobStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobStatsResponse> GetJobStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetJobStatsRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetJobStatsRequestDescriptor, GetJobStatsResponse, GetJobStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobStatsResponse> GetJobStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? jobId, Action<GetJobStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetJobStatsRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetJobStatsRequestDescriptor, GetJobStatsResponse, GetJobStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobStatsResponse> GetJobStatsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetJobStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetJobStatsRequestDescriptor, GetJobStatsResponse, GetJobStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection jobs usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetJobStatsResponse> GetJobStatsAsync(Action<GetJobStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetJobStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetJobStatsRequestDescriptor, GetJobStatsResponse, GetJobStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get machine learning memory usage info.
	/// Get information about how machine learning jobs and trained models are using memory,
	/// on each node, both within the JVM heap, and natively, outside of the JVM.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetMemoryStatsResponse> GetMemoryStatsAsync(GetMemoryStatsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetMemoryStatsRequest, GetMemoryStatsResponse, GetMemoryStatsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get machine learning memory usage info.
	/// Get information about how machine learning jobs and trained models are using memory,
	/// on each node, both within the JVM heap, and natively, outside of the JVM.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetMemoryStatsResponse> GetMemoryStatsAsync(GetMemoryStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetMemoryStatsRequestDescriptor, GetMemoryStatsResponse, GetMemoryStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get machine learning memory usage info.
	/// Get information about how machine learning jobs and trained models are using memory,
	/// on each node, both within the JVM heap, and natively, outside of the JVM.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetMemoryStatsResponse> GetMemoryStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? nodeId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetMemoryStatsRequestDescriptor(nodeId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetMemoryStatsRequestDescriptor, GetMemoryStatsResponse, GetMemoryStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get machine learning memory usage info.
	/// Get information about how machine learning jobs and trained models are using memory,
	/// on each node, both within the JVM heap, and natively, outside of the JVM.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetMemoryStatsResponse> GetMemoryStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? nodeId, Action<GetMemoryStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetMemoryStatsRequestDescriptor(nodeId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetMemoryStatsRequestDescriptor, GetMemoryStatsResponse, GetMemoryStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get machine learning memory usage info.
	/// Get information about how machine learning jobs and trained models are using memory,
	/// on each node, both within the JVM heap, and natively, outside of the JVM.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetMemoryStatsResponse> GetMemoryStatsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetMemoryStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetMemoryStatsRequestDescriptor, GetMemoryStatsResponse, GetMemoryStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get machine learning memory usage info.
	/// Get information about how machine learning jobs and trained models are using memory,
	/// on each node, both within the JVM heap, and natively, outside of the JVM.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-memory.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetMemoryStatsResponse> GetMemoryStatsAsync(Action<GetMemoryStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetMemoryStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetMemoryStatsRequestDescriptor, GetMemoryStatsResponse, GetMemoryStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync(GetModelSnapshotsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequest, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync<TDocument>(GetModelSnapshotsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequestDescriptor<TDocument>, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetModelSnapshotsRequestDescriptor<TDocument>(jobId, snapshotId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequestDescriptor<TDocument>, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId, Action<GetModelSnapshotsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetModelSnapshotsRequestDescriptor<TDocument>(jobId, snapshotId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequestDescriptor<TDocument>, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetModelSnapshotsRequestDescriptor<TDocument>(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequestDescriptor<TDocument>, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<GetModelSnapshotsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetModelSnapshotsRequestDescriptor<TDocument>(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequestDescriptor<TDocument>, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync(GetModelSnapshotsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequestDescriptor, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetModelSnapshotsRequestDescriptor(jobId, snapshotId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequestDescriptor, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id? snapshotId, Action<GetModelSnapshotsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetModelSnapshotsRequestDescriptor(jobId, snapshotId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequestDescriptor, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetModelSnapshotsRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequestDescriptor, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get model snapshots info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotsResponse> GetModelSnapshotsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<GetModelSnapshotsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetModelSnapshotsRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotsRequestDescriptor, GetModelSnapshotsResponse, GetModelSnapshotsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job model snapshot upgrade usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotUpgradeStatsResponse> GetModelSnapshotUpgradeStatsAsync(GetModelSnapshotUpgradeStatsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotUpgradeStatsRequest, GetModelSnapshotUpgradeStatsResponse, GetModelSnapshotUpgradeStatsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job model snapshot upgrade usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotUpgradeStatsResponse> GetModelSnapshotUpgradeStatsAsync(GetModelSnapshotUpgradeStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotUpgradeStatsRequestDescriptor, GetModelSnapshotUpgradeStatsResponse, GetModelSnapshotUpgradeStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job model snapshot upgrade usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotUpgradeStatsResponse> GetModelSnapshotUpgradeStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetModelSnapshotUpgradeStatsRequestDescriptor(jobId, snapshotId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotUpgradeStatsRequestDescriptor, GetModelSnapshotUpgradeStatsResponse, GetModelSnapshotUpgradeStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly detection job model snapshot upgrade usage info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetModelSnapshotUpgradeStatsResponse> GetModelSnapshotUpgradeStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, Action<GetModelSnapshotUpgradeStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetModelSnapshotUpgradeStatsRequestDescriptor(jobId, snapshotId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetModelSnapshotUpgradeStatsRequestDescriptor, GetModelSnapshotUpgradeStatsResponse, GetModelSnapshotUpgradeStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get overall bucket results.
	/// </para>
	/// <para>
	/// Retrievs overall bucket results that summarize the bucket results of
	/// multiple anomaly detection jobs.
	/// </para>
	/// <para>
	/// The <c>overall_score</c> is calculated by combining the scores of all the
	/// buckets within the overall bucket span. First, the maximum
	/// <c>anomaly_score</c> per anomaly detection job in the overall bucket is
	/// calculated. Then the <c>top_n</c> of those scores are averaged to result in
	/// the <c>overall_score</c>. This means that you can fine-tune the
	/// <c>overall_score</c> so that it is more or less sensitive to the number of
	/// jobs that detect an anomaly at the same time. For example, if you set
	/// <c>top_n</c> to <c>1</c>, the <c>overall_score</c> is the maximum bucket score in the
	/// overall bucket. Alternatively, if you set <c>top_n</c> to the number of jobs,
	/// the <c>overall_score</c> is high only when all jobs detect anomalies in that
	/// overall bucket. If you set the <c>bucket_span</c> parameter (to a value
	/// greater than its default), the <c>overall_score</c> is the maximum
	/// <c>overall_score</c> of the overall buckets that have a span equal to the
	/// jobs' largest bucket span.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetOverallBucketsResponse> GetOverallBucketsAsync(GetOverallBucketsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetOverallBucketsRequest, GetOverallBucketsResponse, GetOverallBucketsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get overall bucket results.
	/// </para>
	/// <para>
	/// Retrievs overall bucket results that summarize the bucket results of
	/// multiple anomaly detection jobs.
	/// </para>
	/// <para>
	/// The <c>overall_score</c> is calculated by combining the scores of all the
	/// buckets within the overall bucket span. First, the maximum
	/// <c>anomaly_score</c> per anomaly detection job in the overall bucket is
	/// calculated. Then the <c>top_n</c> of those scores are averaged to result in
	/// the <c>overall_score</c>. This means that you can fine-tune the
	/// <c>overall_score</c> so that it is more or less sensitive to the number of
	/// jobs that detect an anomaly at the same time. For example, if you set
	/// <c>top_n</c> to <c>1</c>, the <c>overall_score</c> is the maximum bucket score in the
	/// overall bucket. Alternatively, if you set <c>top_n</c> to the number of jobs,
	/// the <c>overall_score</c> is high only when all jobs detect anomalies in that
	/// overall bucket. If you set the <c>bucket_span</c> parameter (to a value
	/// greater than its default), the <c>overall_score</c> is the maximum
	/// <c>overall_score</c> of the overall buckets that have a span equal to the
	/// jobs' largest bucket span.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetOverallBucketsResponse> GetOverallBucketsAsync(GetOverallBucketsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetOverallBucketsRequestDescriptor, GetOverallBucketsResponse, GetOverallBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get overall bucket results.
	/// </para>
	/// <para>
	/// Retrievs overall bucket results that summarize the bucket results of
	/// multiple anomaly detection jobs.
	/// </para>
	/// <para>
	/// The <c>overall_score</c> is calculated by combining the scores of all the
	/// buckets within the overall bucket span. First, the maximum
	/// <c>anomaly_score</c> per anomaly detection job in the overall bucket is
	/// calculated. Then the <c>top_n</c> of those scores are averaged to result in
	/// the <c>overall_score</c>. This means that you can fine-tune the
	/// <c>overall_score</c> so that it is more or less sensitive to the number of
	/// jobs that detect an anomaly at the same time. For example, if you set
	/// <c>top_n</c> to <c>1</c>, the <c>overall_score</c> is the maximum bucket score in the
	/// overall bucket. Alternatively, if you set <c>top_n</c> to the number of jobs,
	/// the <c>overall_score</c> is high only when all jobs detect anomalies in that
	/// overall bucket. If you set the <c>bucket_span</c> parameter (to a value
	/// greater than its default), the <c>overall_score</c> is the maximum
	/// <c>overall_score</c> of the overall buckets that have a span equal to the
	/// jobs' largest bucket span.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetOverallBucketsResponse> GetOverallBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetOverallBucketsRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetOverallBucketsRequestDescriptor, GetOverallBucketsResponse, GetOverallBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get overall bucket results.
	/// </para>
	/// <para>
	/// Retrievs overall bucket results that summarize the bucket results of
	/// multiple anomaly detection jobs.
	/// </para>
	/// <para>
	/// The <c>overall_score</c> is calculated by combining the scores of all the
	/// buckets within the overall bucket span. First, the maximum
	/// <c>anomaly_score</c> per anomaly detection job in the overall bucket is
	/// calculated. Then the <c>top_n</c> of those scores are averaged to result in
	/// the <c>overall_score</c>. This means that you can fine-tune the
	/// <c>overall_score</c> so that it is more or less sensitive to the number of
	/// jobs that detect an anomaly at the same time. For example, if you set
	/// <c>top_n</c> to <c>1</c>, the <c>overall_score</c> is the maximum bucket score in the
	/// overall bucket. Alternatively, if you set <c>top_n</c> to the number of jobs,
	/// the <c>overall_score</c> is high only when all jobs detect anomalies in that
	/// overall bucket. If you set the <c>bucket_span</c> parameter (to a value
	/// greater than its default), the <c>overall_score</c> is the maximum
	/// <c>overall_score</c> of the overall buckets that have a span equal to the
	/// jobs' largest bucket span.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetOverallBucketsResponse> GetOverallBucketsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<GetOverallBucketsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetOverallBucketsRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetOverallBucketsRequestDescriptor, GetOverallBucketsResponse, GetOverallBucketsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly records for an anomaly detection job.
	/// Records contain the detailed analytical results. They describe the anomalous
	/// activity that has been identified in the input data based on the detector
	/// configuration.
	/// There can be many anomaly records depending on the characteristics and size
	/// of the input data. In practice, there are often too many to be able to
	/// manually process them. The machine learning features therefore perform a
	/// sophisticated aggregation of the anomaly records into buckets.
	/// The number of record results depends on the number of anomalies found in each
	/// bucket, which relates to the number of time series being modeled and the
	/// number of detectors.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRecordsResponse> GetRecordsAsync(GetRecordsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetRecordsRequest, GetRecordsResponse, GetRecordsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly records for an anomaly detection job.
	/// Records contain the detailed analytical results. They describe the anomalous
	/// activity that has been identified in the input data based on the detector
	/// configuration.
	/// There can be many anomaly records depending on the characteristics and size
	/// of the input data. In practice, there are often too many to be able to
	/// manually process them. The machine learning features therefore perform a
	/// sophisticated aggregation of the anomaly records into buckets.
	/// The number of record results depends on the number of anomalies found in each
	/// bucket, which relates to the number of time series being modeled and the
	/// number of detectors.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRecordsResponse> GetRecordsAsync<TDocument>(GetRecordsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetRecordsRequestDescriptor<TDocument>, GetRecordsResponse, GetRecordsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly records for an anomaly detection job.
	/// Records contain the detailed analytical results. They describe the anomalous
	/// activity that has been identified in the input data based on the detector
	/// configuration.
	/// There can be many anomaly records depending on the characteristics and size
	/// of the input data. In practice, there are often too many to be able to
	/// manually process them. The machine learning features therefore perform a
	/// sophisticated aggregation of the anomaly records into buckets.
	/// The number of record results depends on the number of anomalies found in each
	/// bucket, which relates to the number of time series being modeled and the
	/// number of detectors.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRecordsResponse> GetRecordsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetRecordsRequestDescriptor<TDocument>(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetRecordsRequestDescriptor<TDocument>, GetRecordsResponse, GetRecordsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly records for an anomaly detection job.
	/// Records contain the detailed analytical results. They describe the anomalous
	/// activity that has been identified in the input data based on the detector
	/// configuration.
	/// There can be many anomaly records depending on the characteristics and size
	/// of the input data. In practice, there are often too many to be able to
	/// manually process them. The machine learning features therefore perform a
	/// sophisticated aggregation of the anomaly records into buckets.
	/// The number of record results depends on the number of anomalies found in each
	/// bucket, which relates to the number of time series being modeled and the
	/// number of detectors.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRecordsResponse> GetRecordsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<GetRecordsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetRecordsRequestDescriptor<TDocument>(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetRecordsRequestDescriptor<TDocument>, GetRecordsResponse, GetRecordsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly records for an anomaly detection job.
	/// Records contain the detailed analytical results. They describe the anomalous
	/// activity that has been identified in the input data based on the detector
	/// configuration.
	/// There can be many anomaly records depending on the characteristics and size
	/// of the input data. In practice, there are often too many to be able to
	/// manually process them. The machine learning features therefore perform a
	/// sophisticated aggregation of the anomaly records into buckets.
	/// The number of record results depends on the number of anomalies found in each
	/// bucket, which relates to the number of time series being modeled and the
	/// number of detectors.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRecordsResponse> GetRecordsAsync(GetRecordsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetRecordsRequestDescriptor, GetRecordsResponse, GetRecordsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly records for an anomaly detection job.
	/// Records contain the detailed analytical results. They describe the anomalous
	/// activity that has been identified in the input data based on the detector
	/// configuration.
	/// There can be many anomaly records depending on the characteristics and size
	/// of the input data. In practice, there are often too many to be able to
	/// manually process them. The machine learning features therefore perform a
	/// sophisticated aggregation of the anomaly records into buckets.
	/// The number of record results depends on the number of anomalies found in each
	/// bucket, which relates to the number of time series being modeled and the
	/// number of detectors.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRecordsResponse> GetRecordsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetRecordsRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetRecordsRequestDescriptor, GetRecordsResponse, GetRecordsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get anomaly records for an anomaly detection job.
	/// Records contain the detailed analytical results. They describe the anomalous
	/// activity that has been identified in the input data based on the detector
	/// configuration.
	/// There can be many anomaly records depending on the characteristics and size
	/// of the input data. In practice, there are often too many to be able to
	/// manually process them. The machine learning features therefore perform a
	/// sophisticated aggregation of the anomaly records into buckets.
	/// The number of record results depends on the number of anomalies found in each
	/// bucket, which relates to the number of time series being modeled and the
	/// number of detectors.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetRecordsResponse> GetRecordsAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<GetRecordsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetRecordsRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetRecordsRequestDescriptor, GetRecordsResponse, GetRecordsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained model configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsResponse> GetTrainedModelsAsync(GetTrainedModelsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsRequest, GetTrainedModelsResponse, GetTrainedModelsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained model configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsResponse> GetTrainedModelsAsync(GetTrainedModelsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsRequestDescriptor, GetTrainedModelsResponse, GetTrainedModelsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained model configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsResponse> GetTrainedModelsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetTrainedModelsRequestDescriptor(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsRequestDescriptor, GetTrainedModelsResponse, GetTrainedModelsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained model configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsResponse> GetTrainedModelsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId, Action<GetTrainedModelsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetTrainedModelsRequestDescriptor(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsRequestDescriptor, GetTrainedModelsResponse, GetTrainedModelsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained model configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsResponse> GetTrainedModelsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetTrainedModelsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsRequestDescriptor, GetTrainedModelsResponse, GetTrainedModelsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained model configuration info.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsResponse> GetTrainedModelsAsync(Action<GetTrainedModelsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetTrainedModelsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsRequestDescriptor, GetTrainedModelsResponse, GetTrainedModelsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained models usage info.
	/// You can get usage information for multiple trained
	/// models in a single API request by using a comma-separated list of model IDs or a wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsStatsResponse> GetTrainedModelsStatsAsync(GetTrainedModelsStatsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsStatsRequest, GetTrainedModelsStatsResponse, GetTrainedModelsStatsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained models usage info.
	/// You can get usage information for multiple trained
	/// models in a single API request by using a comma-separated list of model IDs or a wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsStatsResponse> GetTrainedModelsStatsAsync(GetTrainedModelsStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsStatsRequestDescriptor, GetTrainedModelsStatsResponse, GetTrainedModelsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained models usage info.
	/// You can get usage information for multiple trained
	/// models in a single API request by using a comma-separated list of model IDs or a wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsStatsResponse> GetTrainedModelsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetTrainedModelsStatsRequestDescriptor(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsStatsRequestDescriptor, GetTrainedModelsStatsResponse, GetTrainedModelsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained models usage info.
	/// You can get usage information for multiple trained
	/// models in a single API request by using a comma-separated list of model IDs or a wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsStatsResponse> GetTrainedModelsStatsAsync(Elastic.Clients.Elasticsearch.Serverless.Ids? modelId, Action<GetTrainedModelsStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetTrainedModelsStatsRequestDescriptor(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsStatsRequestDescriptor, GetTrainedModelsStatsResponse, GetTrainedModelsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained models usage info.
	/// You can get usage information for multiple trained
	/// models in a single API request by using a comma-separated list of model IDs or a wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsStatsResponse> GetTrainedModelsStatsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetTrainedModelsStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsStatsRequestDescriptor, GetTrainedModelsStatsResponse, GetTrainedModelsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Get trained models usage info.
	/// You can get usage information for multiple trained
	/// models in a single API request by using a comma-separated list of model IDs or a wildcard expression.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetTrainedModelsStatsResponse> GetTrainedModelsStatsAsync(Action<GetTrainedModelsStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetTrainedModelsStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetTrainedModelsStatsRequestDescriptor, GetTrainedModelsStatsResponse, GetTrainedModelsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate a trained model.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<InferTrainedModelResponse> InferTrainedModelAsync(InferTrainedModelRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<InferTrainedModelRequest, InferTrainedModelResponse, InferTrainedModelRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate a trained model.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<InferTrainedModelResponse> InferTrainedModelAsync<TDocument>(InferTrainedModelRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<InferTrainedModelRequestDescriptor<TDocument>, InferTrainedModelResponse, InferTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate a trained model.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<InferTrainedModelResponse> InferTrainedModelAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new InferTrainedModelRequestDescriptor<TDocument>(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<InferTrainedModelRequestDescriptor<TDocument>, InferTrainedModelResponse, InferTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate a trained model.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<InferTrainedModelResponse> InferTrainedModelAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action<InferTrainedModelRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new InferTrainedModelRequestDescriptor<TDocument>(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<InferTrainedModelRequestDescriptor<TDocument>, InferTrainedModelResponse, InferTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate a trained model.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<InferTrainedModelResponse> InferTrainedModelAsync(InferTrainedModelRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<InferTrainedModelRequestDescriptor, InferTrainedModelResponse, InferTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate a trained model.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<InferTrainedModelResponse> InferTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new InferTrainedModelRequestDescriptor(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<InferTrainedModelRequestDescriptor, InferTrainedModelResponse, InferTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Evaluate a trained model.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/infer-trained-model.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<InferTrainedModelResponse> InferTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action<InferTrainedModelRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new InferTrainedModelRequestDescriptor(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<InferTrainedModelRequestDescriptor, InferTrainedModelResponse, InferTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Return ML defaults and limits.
	/// Returns defaults and limits used by machine learning.
	/// This endpoint is designed to be used by a user interface that needs to fully
	/// understand machine learning configurations where some options are not
	/// specified, meaning that the defaults should be used. This endpoint may be
	/// used to find out what those defaults are. It also provides information about
	/// the maximum size of machine learning jobs that could run in the current
	/// cluster configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<MlInfoResponse> InfoAsync(MlInfoRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<MlInfoRequest, MlInfoResponse, MlInfoRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Return ML defaults and limits.
	/// Returns defaults and limits used by machine learning.
	/// This endpoint is designed to be used by a user interface that needs to fully
	/// understand machine learning configurations where some options are not
	/// specified, meaning that the defaults should be used. This endpoint may be
	/// used to find out what those defaults are. It also provides information about
	/// the maximum size of machine learning jobs that could run in the current
	/// cluster configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<MlInfoResponse> InfoAsync(MlInfoRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<MlInfoRequestDescriptor, MlInfoResponse, MlInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Return ML defaults and limits.
	/// Returns defaults and limits used by machine learning.
	/// This endpoint is designed to be used by a user interface that needs to fully
	/// understand machine learning configurations where some options are not
	/// specified, meaning that the defaults should be used. This endpoint may be
	/// used to find out what those defaults are. It also provides information about
	/// the maximum size of machine learning jobs that could run in the current
	/// cluster configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<MlInfoResponse> InfoAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new MlInfoRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<MlInfoRequestDescriptor, MlInfoResponse, MlInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Return ML defaults and limits.
	/// Returns defaults and limits used by machine learning.
	/// This endpoint is designed to be used by a user interface that needs to fully
	/// understand machine learning configurations where some options are not
	/// specified, meaning that the defaults should be used. This endpoint may be
	/// used to find out what those defaults are. It also provides information about
	/// the maximum size of machine learning jobs that could run in the current
	/// cluster configuration.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<MlInfoResponse> InfoAsync(Action<MlInfoRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new MlInfoRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<MlInfoRequestDescriptor, MlInfoResponse, MlInfoRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Open anomaly detection jobs.
	/// An anomaly detection job must be opened to be ready to receive and analyze
	/// data. It can be opened and closed multiple times throughout its lifecycle.
	/// When you open a new job, it starts with an empty model.
	/// When you open an existing job, the most recent model state is automatically
	/// loaded. The job is ready to resume its analysis from where it left off, once
	/// new data is received.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<OpenJobResponse> OpenJobAsync(OpenJobRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<OpenJobRequest, OpenJobResponse, OpenJobRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Open anomaly detection jobs.
	/// An anomaly detection job must be opened to be ready to receive and analyze
	/// data. It can be opened and closed multiple times throughout its lifecycle.
	/// When you open a new job, it starts with an empty model.
	/// When you open an existing job, the most recent model state is automatically
	/// loaded. The job is ready to resume its analysis from where it left off, once
	/// new data is received.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<OpenJobResponse> OpenJobAsync(OpenJobRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<OpenJobRequestDescriptor, OpenJobResponse, OpenJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Open anomaly detection jobs.
	/// An anomaly detection job must be opened to be ready to receive and analyze
	/// data. It can be opened and closed multiple times throughout its lifecycle.
	/// When you open a new job, it starts with an empty model.
	/// When you open an existing job, the most recent model state is automatically
	/// loaded. The job is ready to resume its analysis from where it left off, once
	/// new data is received.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<OpenJobResponse> OpenJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new OpenJobRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<OpenJobRequestDescriptor, OpenJobResponse, OpenJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Open anomaly detection jobs.
	/// An anomaly detection job must be opened to be ready to receive and analyze
	/// data. It can be opened and closed multiple times throughout its lifecycle.
	/// When you open a new job, it starts with an empty model.
	/// When you open an existing job, the most recent model state is automatically
	/// loaded. The job is ready to resume its analysis from where it left off, once
	/// new data is received.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<OpenJobResponse> OpenJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<OpenJobRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new OpenJobRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<OpenJobRequestDescriptor, OpenJobResponse, OpenJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Add scheduled events to the calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PostCalendarEventsResponse> PostCalendarEventsAsync(PostCalendarEventsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PostCalendarEventsRequest, PostCalendarEventsResponse, PostCalendarEventsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Add scheduled events to the calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PostCalendarEventsResponse> PostCalendarEventsAsync(PostCalendarEventsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PostCalendarEventsRequestDescriptor, PostCalendarEventsResponse, PostCalendarEventsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Add scheduled events to the calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PostCalendarEventsResponse> PostCalendarEventsAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PostCalendarEventsRequestDescriptor(calendarId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PostCalendarEventsRequestDescriptor, PostCalendarEventsResponse, PostCalendarEventsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Add scheduled events to the calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PostCalendarEventsResponse> PostCalendarEventsAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Action<PostCalendarEventsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PostCalendarEventsRequestDescriptor(calendarId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PostCalendarEventsRequestDescriptor, PostCalendarEventsResponse, PostCalendarEventsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync(PreviewDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequest, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync<TDocument>(PreviewDataFrameAnalyticsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequestDescriptor<TDocument>, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default)
	{
		var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequestDescriptor<TDocument>, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action<PreviewDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequestDescriptor<TDocument>, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync<TDocument>(CancellationToken cancellationToken = default)
	{
		var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequestDescriptor<TDocument>, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync<TDocument>(Action<PreviewDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequestDescriptor<TDocument>, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync(PreviewDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequestDescriptor, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, CancellationToken cancellationToken = default)
	{
		var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequestDescriptor, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id? id, Action<PreviewDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequestDescriptor, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequestDescriptor, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Preview features used by data frame analytics.
	/// Previews the extracted features used by a data frame analytics config.
	/// </para>
	/// <para><see href="http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PreviewDataFrameAnalyticsResponse> PreviewDataFrameAnalyticsAsync(Action<PreviewDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PreviewDataFrameAnalyticsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PreviewDataFrameAnalyticsRequestDescriptor, PreviewDataFrameAnalyticsResponse, PreviewDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutCalendarResponse> PutCalendarAsync(PutCalendarRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutCalendarRequest, PutCalendarResponse, PutCalendarRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutCalendarResponse> PutCalendarAsync(PutCalendarRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutCalendarRequestDescriptor, PutCalendarResponse, PutCalendarRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutCalendarResponse> PutCalendarAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutCalendarRequestDescriptor(calendarId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutCalendarRequestDescriptor, PutCalendarResponse, PutCalendarRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutCalendarResponse> PutCalendarAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Action<PutCalendarRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutCalendarRequestDescriptor(calendarId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutCalendarRequestDescriptor, PutCalendarResponse, PutCalendarRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Add anomaly detection job to calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutCalendarJobResponse> PutCalendarJobAsync(PutCalendarJobRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutCalendarJobRequest, PutCalendarJobResponse, PutCalendarJobRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Add anomaly detection job to calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutCalendarJobResponse> PutCalendarJobAsync(PutCalendarJobRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutCalendarJobRequestDescriptor, PutCalendarJobResponse, PutCalendarJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Add anomaly detection job to calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutCalendarJobResponse> PutCalendarJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutCalendarJobRequestDescriptor(calendarId, jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutCalendarJobRequestDescriptor, PutCalendarJobResponse, PutCalendarJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Add anomaly detection job to calendar.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutCalendarJobResponse> PutCalendarJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id calendarId, Elastic.Clients.Elasticsearch.Serverless.Ids jobId, Action<PutCalendarJobRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutCalendarJobRequestDescriptor(calendarId, jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutCalendarJobRequestDescriptor, PutCalendarJobResponse, PutCalendarJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a datafeed.
	/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
	/// You can associate only one datafeed with each anomaly detection job.
	/// The datafeed contains a query that runs at a defined interval (<c>frequency</c>).
	/// If you are concerned about delayed data, you can add a delay (<c>query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the </c>.ml-config<c>index. Do not give users</c>write<c>privileges on the</c>.ml-config` index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDatafeedResponse> PutDatafeedAsync(PutDatafeedRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutDatafeedRequest, PutDatafeedResponse, PutDatafeedRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a datafeed.
	/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
	/// You can associate only one datafeed with each anomaly detection job.
	/// The datafeed contains a query that runs at a defined interval (<c>frequency</c>).
	/// If you are concerned about delayed data, you can add a delay (<c>query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the </c>.ml-config<c>index. Do not give users</c>write<c>privileges on the</c>.ml-config` index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDatafeedResponse> PutDatafeedAsync<TDocument>(PutDatafeedRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDatafeedRequestDescriptor<TDocument>, PutDatafeedResponse, PutDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a datafeed.
	/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
	/// You can associate only one datafeed with each anomaly detection job.
	/// The datafeed contains a query that runs at a defined interval (<c>frequency</c>).
	/// If you are concerned about delayed data, you can add a delay (<c>query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the </c>.ml-config<c>index. Do not give users</c>write<c>privileges on the</c>.ml-config` index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDatafeedResponse> PutDatafeedAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutDatafeedRequestDescriptor<TDocument>(datafeedId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDatafeedRequestDescriptor<TDocument>, PutDatafeedResponse, PutDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a datafeed.
	/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
	/// You can associate only one datafeed with each anomaly detection job.
	/// The datafeed contains a query that runs at a defined interval (<c>frequency</c>).
	/// If you are concerned about delayed data, you can add a delay (<c>query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the </c>.ml-config<c>index. Do not give users</c>write<c>privileges on the</c>.ml-config` index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDatafeedResponse> PutDatafeedAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action<PutDatafeedRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutDatafeedRequestDescriptor<TDocument>(datafeedId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDatafeedRequestDescriptor<TDocument>, PutDatafeedResponse, PutDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a datafeed.
	/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
	/// You can associate only one datafeed with each anomaly detection job.
	/// The datafeed contains a query that runs at a defined interval (<c>frequency</c>).
	/// If you are concerned about delayed data, you can add a delay (<c>query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the </c>.ml-config<c>index. Do not give users</c>write<c>privileges on the</c>.ml-config` index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDatafeedResponse> PutDatafeedAsync(PutDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDatafeedRequestDescriptor, PutDatafeedResponse, PutDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a datafeed.
	/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
	/// You can associate only one datafeed with each anomaly detection job.
	/// The datafeed contains a query that runs at a defined interval (<c>frequency</c>).
	/// If you are concerned about delayed data, you can add a delay (<c>query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the </c>.ml-config<c>index. Do not give users</c>write<c>privileges on the</c>.ml-config` index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDatafeedResponse> PutDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutDatafeedRequestDescriptor(datafeedId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDatafeedRequestDescriptor, PutDatafeedResponse, PutDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a datafeed.
	/// Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
	/// You can associate only one datafeed with each anomaly detection job.
	/// The datafeed contains a query that runs at a defined interval (<c>frequency</c>).
	/// If you are concerned about delayed data, you can add a delay (<c>query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the </c>.ml-config<c>index. Do not give users</c>write<c>privileges on the</c>.ml-config` index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDatafeedResponse> PutDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action<PutDatafeedRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutDatafeedRequestDescriptor(datafeedId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDatafeedRequestDescriptor, PutDatafeedResponse, PutDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a data frame analytics job.
	/// This API creates a data frame analytics job that performs an analysis on the
	/// source indices and stores the outcome in a destination index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDataFrameAnalyticsResponse> PutDataFrameAnalyticsAsync(PutDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutDataFrameAnalyticsRequest, PutDataFrameAnalyticsResponse, PutDataFrameAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a data frame analytics job.
	/// This API creates a data frame analytics job that performs an analysis on the
	/// source indices and stores the outcome in a destination index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDataFrameAnalyticsResponse> PutDataFrameAnalyticsAsync<TDocument>(PutDataFrameAnalyticsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDataFrameAnalyticsRequestDescriptor<TDocument>, PutDataFrameAnalyticsResponse, PutDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a data frame analytics job.
	/// This API creates a data frame analytics job that performs an analysis on the
	/// source indices and stores the outcome in a destination index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDataFrameAnalyticsResponse> PutDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDataFrameAnalyticsRequestDescriptor<TDocument>, PutDataFrameAnalyticsResponse, PutDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a data frame analytics job.
	/// This API creates a data frame analytics job that performs an analysis on the
	/// source indices and stores the outcome in a destination index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDataFrameAnalyticsResponse> PutDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<PutDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDataFrameAnalyticsRequestDescriptor<TDocument>, PutDataFrameAnalyticsResponse, PutDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a data frame analytics job.
	/// This API creates a data frame analytics job that performs an analysis on the
	/// source indices and stores the outcome in a destination index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDataFrameAnalyticsResponse> PutDataFrameAnalyticsAsync(PutDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDataFrameAnalyticsRequestDescriptor, PutDataFrameAnalyticsResponse, PutDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a data frame analytics job.
	/// This API creates a data frame analytics job that performs an analysis on the
	/// source indices and stores the outcome in a destination index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDataFrameAnalyticsResponse> PutDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutDataFrameAnalyticsRequestDescriptor(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDataFrameAnalyticsRequestDescriptor, PutDataFrameAnalyticsResponse, PutDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a data frame analytics job.
	/// This API creates a data frame analytics job that performs an analysis on the
	/// source indices and stores the outcome in a destination index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/put-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutDataFrameAnalyticsResponse> PutDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<PutDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutDataFrameAnalyticsRequestDescriptor(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutDataFrameAnalyticsRequestDescriptor, PutDataFrameAnalyticsResponse, PutDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a filter.
	/// A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
	/// Specifically, filters are referenced in the <c>custom_rules</c> property of detector configuration objects.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutFilterResponse> PutFilterAsync(PutFilterRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutFilterRequest, PutFilterResponse, PutFilterRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a filter.
	/// A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
	/// Specifically, filters are referenced in the <c>custom_rules</c> property of detector configuration objects.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutFilterResponse> PutFilterAsync(PutFilterRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutFilterRequestDescriptor, PutFilterResponse, PutFilterRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a filter.
	/// A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
	/// Specifically, filters are referenced in the <c>custom_rules</c> property of detector configuration objects.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutFilterResponse> PutFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutFilterRequestDescriptor(filterId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutFilterRequestDescriptor, PutFilterResponse, PutFilterRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a filter.
	/// A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
	/// Specifically, filters are referenced in the <c>custom_rules</c> property of detector configuration objects.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutFilterResponse> PutFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, Action<PutFilterRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutFilterRequestDescriptor(filterId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutFilterRequestDescriptor, PutFilterResponse, PutFilterRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create an anomaly detection job.
	/// If you include a <c>datafeed_config</c>, you must have read index privileges on the source index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutJobResponse> PutJobAsync(PutJobRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutJobRequest, PutJobResponse, PutJobRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create an anomaly detection job.
	/// If you include a <c>datafeed_config</c>, you must have read index privileges on the source index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutJobResponse> PutJobAsync<TDocument>(PutJobRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutJobRequestDescriptor<TDocument>, PutJobResponse, PutJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create an anomaly detection job.
	/// If you include a <c>datafeed_config</c>, you must have read index privileges on the source index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutJobResponse> PutJobAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutJobRequestDescriptor<TDocument>(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutJobRequestDescriptor<TDocument>, PutJobResponse, PutJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create an anomaly detection job.
	/// If you include a <c>datafeed_config</c>, you must have read index privileges on the source index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutJobResponse> PutJobAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<PutJobRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutJobRequestDescriptor<TDocument>(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutJobRequestDescriptor<TDocument>, PutJobResponse, PutJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create an anomaly detection job.
	/// If you include a <c>datafeed_config</c>, you must have read index privileges on the source index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutJobResponse> PutJobAsync(PutJobRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutJobRequestDescriptor, PutJobResponse, PutJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create an anomaly detection job.
	/// If you include a <c>datafeed_config</c>, you must have read index privileges on the source index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutJobResponse> PutJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutJobRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutJobRequestDescriptor, PutJobResponse, PutJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create an anomaly detection job.
	/// If you include a <c>datafeed_config</c>, you must have read index privileges on the source index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutJobResponse> PutJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<PutJobRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutJobRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutJobRequestDescriptor, PutJobResponse, PutJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model.
	/// Enable you to supply a trained model that is not created by data frame analytics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelResponse> PutTrainedModelAsync(PutTrainedModelRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutTrainedModelRequest, PutTrainedModelResponse, PutTrainedModelRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model.
	/// Enable you to supply a trained model that is not created by data frame analytics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelResponse> PutTrainedModelAsync<TDocument>(PutTrainedModelRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelRequestDescriptor<TDocument>, PutTrainedModelResponse, PutTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model.
	/// Enable you to supply a trained model that is not created by data frame analytics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelResponse> PutTrainedModelAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutTrainedModelRequestDescriptor<TDocument>(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelRequestDescriptor<TDocument>, PutTrainedModelResponse, PutTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model.
	/// Enable you to supply a trained model that is not created by data frame analytics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelResponse> PutTrainedModelAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action<PutTrainedModelRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutTrainedModelRequestDescriptor<TDocument>(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelRequestDescriptor<TDocument>, PutTrainedModelResponse, PutTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model.
	/// Enable you to supply a trained model that is not created by data frame analytics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelResponse> PutTrainedModelAsync(PutTrainedModelRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelRequestDescriptor, PutTrainedModelResponse, PutTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model.
	/// Enable you to supply a trained model that is not created by data frame analytics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelResponse> PutTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutTrainedModelRequestDescriptor(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelRequestDescriptor, PutTrainedModelResponse, PutTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model.
	/// Enable you to supply a trained model that is not created by data frame analytics.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelResponse> PutTrainedModelAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action<PutTrainedModelRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutTrainedModelRequestDescriptor(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelRequestDescriptor, PutTrainedModelResponse, PutTrainedModelRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create or update a trained model alias.
	/// A trained model alias is a logical name used to reference a single trained
	/// model.
	/// You can use aliases instead of trained model identifiers to make it easier to
	/// reference your models. For example, you can use aliases in inference
	/// aggregations and processors.
	/// An alias must be unique and refer to only a single trained model. However,
	/// you can have multiple aliases for each trained model.
	/// If you use this API to update an alias such that it references a different
	/// trained model ID and the model uses a different type of data frame analytics,
	/// an error occurs. For example, this situation occurs if you have a trained
	/// model for regression analysis and a trained model for classification
	/// analysis; you cannot reassign an alias from one type of trained model to
	/// another.
	/// If you use this API to update an alias and there are very few input fields in
	/// common between the old and new trained models for the model alias, the API
	/// returns a warning.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelAliasResponse> PutTrainedModelAliasAsync(PutTrainedModelAliasRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutTrainedModelAliasRequest, PutTrainedModelAliasResponse, PutTrainedModelAliasRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create or update a trained model alias.
	/// A trained model alias is a logical name used to reference a single trained
	/// model.
	/// You can use aliases instead of trained model identifiers to make it easier to
	/// reference your models. For example, you can use aliases in inference
	/// aggregations and processors.
	/// An alias must be unique and refer to only a single trained model. However,
	/// you can have multiple aliases for each trained model.
	/// If you use this API to update an alias such that it references a different
	/// trained model ID and the model uses a different type of data frame analytics,
	/// an error occurs. For example, this situation occurs if you have a trained
	/// model for regression analysis and a trained model for classification
	/// analysis; you cannot reassign an alias from one type of trained model to
	/// another.
	/// If you use this API to update an alias and there are very few input fields in
	/// common between the old and new trained models for the model alias, the API
	/// returns a warning.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelAliasResponse> PutTrainedModelAliasAsync(PutTrainedModelAliasRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelAliasRequestDescriptor, PutTrainedModelAliasResponse, PutTrainedModelAliasRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create or update a trained model alias.
	/// A trained model alias is a logical name used to reference a single trained
	/// model.
	/// You can use aliases instead of trained model identifiers to make it easier to
	/// reference your models. For example, you can use aliases in inference
	/// aggregations and processors.
	/// An alias must be unique and refer to only a single trained model. However,
	/// you can have multiple aliases for each trained model.
	/// If you use this API to update an alias such that it references a different
	/// trained model ID and the model uses a different type of data frame analytics,
	/// an error occurs. For example, this situation occurs if you have a trained
	/// model for regression analysis and a trained model for classification
	/// analysis; you cannot reassign an alias from one type of trained model to
	/// another.
	/// If you use this API to update an alias and there are very few input fields in
	/// common between the old and new trained models for the model alias, the API
	/// returns a warning.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelAliasResponse> PutTrainedModelAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutTrainedModelAliasRequestDescriptor(modelId, modelAlias);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelAliasRequestDescriptor, PutTrainedModelAliasResponse, PutTrainedModelAliasRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create or update a trained model alias.
	/// A trained model alias is a logical name used to reference a single trained
	/// model.
	/// You can use aliases instead of trained model identifiers to make it easier to
	/// reference your models. For example, you can use aliases in inference
	/// aggregations and processors.
	/// An alias must be unique and refer to only a single trained model. However,
	/// you can have multiple aliases for each trained model.
	/// If you use this API to update an alias such that it references a different
	/// trained model ID and the model uses a different type of data frame analytics,
	/// an error occurs. For example, this situation occurs if you have a trained
	/// model for regression analysis and a trained model for classification
	/// analysis; you cannot reassign an alias from one type of trained model to
	/// another.
	/// If you use this API to update an alias and there are very few input fields in
	/// common between the old and new trained models for the model alias, the API
	/// returns a warning.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelAliasResponse> PutTrainedModelAliasAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Elastic.Clients.Elasticsearch.Serverless.Name modelAlias, Action<PutTrainedModelAliasRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutTrainedModelAliasRequestDescriptor(modelId, modelAlias);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelAliasRequestDescriptor, PutTrainedModelAliasResponse, PutTrainedModelAliasRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create part of a trained model definition.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelDefinitionPartResponse> PutTrainedModelDefinitionPartAsync(PutTrainedModelDefinitionPartRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutTrainedModelDefinitionPartRequest, PutTrainedModelDefinitionPartResponse, PutTrainedModelDefinitionPartRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create part of a trained model definition.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelDefinitionPartResponse> PutTrainedModelDefinitionPartAsync(PutTrainedModelDefinitionPartRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelDefinitionPartRequestDescriptor, PutTrainedModelDefinitionPartResponse, PutTrainedModelDefinitionPartRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create part of a trained model definition.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelDefinitionPartResponse> PutTrainedModelDefinitionPartAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, int part, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutTrainedModelDefinitionPartRequestDescriptor(modelId, part);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelDefinitionPartRequestDescriptor, PutTrainedModelDefinitionPartResponse, PutTrainedModelDefinitionPartRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create part of a trained model definition.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-definition-part.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelDefinitionPartResponse> PutTrainedModelDefinitionPartAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, int part, Action<PutTrainedModelDefinitionPartRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutTrainedModelDefinitionPartRequestDescriptor(modelId, part);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelDefinitionPartRequestDescriptor, PutTrainedModelDefinitionPartResponse, PutTrainedModelDefinitionPartRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model vocabulary.
	/// This API is supported only for natural language processing (NLP) models.
	/// The vocabulary is stored in the index as described in <c>inference_config.*.vocabulary</c> of the trained model definition.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelVocabularyResponse> PutTrainedModelVocabularyAsync(PutTrainedModelVocabularyRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutTrainedModelVocabularyRequest, PutTrainedModelVocabularyResponse, PutTrainedModelVocabularyRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model vocabulary.
	/// This API is supported only for natural language processing (NLP) models.
	/// The vocabulary is stored in the index as described in <c>inference_config.*.vocabulary</c> of the trained model definition.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelVocabularyResponse> PutTrainedModelVocabularyAsync(PutTrainedModelVocabularyRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelVocabularyRequestDescriptor, PutTrainedModelVocabularyResponse, PutTrainedModelVocabularyRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model vocabulary.
	/// This API is supported only for natural language processing (NLP) models.
	/// The vocabulary is stored in the index as described in <c>inference_config.*.vocabulary</c> of the trained model definition.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelVocabularyResponse> PutTrainedModelVocabularyAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutTrainedModelVocabularyRequestDescriptor(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelVocabularyRequestDescriptor, PutTrainedModelVocabularyResponse, PutTrainedModelVocabularyRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Create a trained model vocabulary.
	/// This API is supported only for natural language processing (NLP) models.
	/// The vocabulary is stored in the index as described in <c>inference_config.*.vocabulary</c> of the trained model definition.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-model-vocabulary.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutTrainedModelVocabularyResponse> PutTrainedModelVocabularyAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action<PutTrainedModelVocabularyRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutTrainedModelVocabularyRequestDescriptor(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutTrainedModelVocabularyRequestDescriptor, PutTrainedModelVocabularyResponse, PutTrainedModelVocabularyRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Reset an anomaly detection job.
	/// All model state and results are deleted. The job is ready to start over as if
	/// it had just been created.
	/// It is not currently possible to reset multiple jobs using wildcards or a
	/// comma separated list.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ResetJobResponse> ResetJobAsync(ResetJobRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ResetJobRequest, ResetJobResponse, ResetJobRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Reset an anomaly detection job.
	/// All model state and results are deleted. The job is ready to start over as if
	/// it had just been created.
	/// It is not currently possible to reset multiple jobs using wildcards or a
	/// comma separated list.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ResetJobResponse> ResetJobAsync(ResetJobRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ResetJobRequestDescriptor, ResetJobResponse, ResetJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Reset an anomaly detection job.
	/// All model state and results are deleted. The job is ready to start over as if
	/// it had just been created.
	/// It is not currently possible to reset multiple jobs using wildcards or a
	/// comma separated list.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ResetJobResponse> ResetJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new ResetJobRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<ResetJobRequestDescriptor, ResetJobResponse, ResetJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Reset an anomaly detection job.
	/// All model state and results are deleted. The job is ready to start over as if
	/// it had just been created.
	/// It is not currently possible to reset multiple jobs using wildcards or a
	/// comma separated list.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ResetJobResponse> ResetJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<ResetJobRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ResetJobRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ResetJobRequestDescriptor, ResetJobResponse, ResetJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Revert to a snapshot.
	/// The machine learning features react quickly to anomalous input, learning new
	/// behaviors in data. Highly anomalous input increases the variance in the
	/// models whilst the system learns whether this is a new step-change in behavior
	/// or a one-off event. In the case where this anomalous input is known to be a
	/// one-off, then it might be appropriate to reset the model state to a time
	/// before this event. For example, you might consider reverting to a saved
	/// snapshot after Black Friday or a critical system failure.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<RevertModelSnapshotResponse> RevertModelSnapshotAsync(RevertModelSnapshotRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<RevertModelSnapshotRequest, RevertModelSnapshotResponse, RevertModelSnapshotRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Revert to a snapshot.
	/// The machine learning features react quickly to anomalous input, learning new
	/// behaviors in data. Highly anomalous input increases the variance in the
	/// models whilst the system learns whether this is a new step-change in behavior
	/// or a one-off event. In the case where this anomalous input is known to be a
	/// one-off, then it might be appropriate to reset the model state to a time
	/// before this event. For example, you might consider reverting to a saved
	/// snapshot after Black Friday or a critical system failure.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<RevertModelSnapshotResponse> RevertModelSnapshotAsync(RevertModelSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<RevertModelSnapshotRequestDescriptor, RevertModelSnapshotResponse, RevertModelSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Revert to a snapshot.
	/// The machine learning features react quickly to anomalous input, learning new
	/// behaviors in data. Highly anomalous input increases the variance in the
	/// models whilst the system learns whether this is a new step-change in behavior
	/// or a one-off event. In the case where this anomalous input is known to be a
	/// one-off, then it might be appropriate to reset the model state to a time
	/// before this event. For example, you might consider reverting to a saved
	/// snapshot after Black Friday or a critical system failure.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<RevertModelSnapshotResponse> RevertModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, CancellationToken cancellationToken = default)
	{
		var descriptor = new RevertModelSnapshotRequestDescriptor(jobId, snapshotId);
		descriptor.BeforeRequest();
		return DoRequestAsync<RevertModelSnapshotRequestDescriptor, RevertModelSnapshotResponse, RevertModelSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Revert to a snapshot.
	/// The machine learning features react quickly to anomalous input, learning new
	/// behaviors in data. Highly anomalous input increases the variance in the
	/// models whilst the system learns whether this is a new step-change in behavior
	/// or a one-off event. In the case where this anomalous input is known to be a
	/// one-off, then it might be appropriate to reset the model state to a time
	/// before this event. For example, you might consider reverting to a saved
	/// snapshot after Black Friday or a critical system failure.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<RevertModelSnapshotResponse> RevertModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, Action<RevertModelSnapshotRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new RevertModelSnapshotRequestDescriptor(jobId, snapshotId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<RevertModelSnapshotRequestDescriptor, RevertModelSnapshotResponse, RevertModelSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Set upgrade_mode for ML indices.
	/// Sets a cluster wide upgrade_mode setting that prepares machine learning
	/// indices for an upgrade.
	/// When upgrading your cluster, in some circumstances you must restart your
	/// nodes and reindex your machine learning indices. In those circumstances,
	/// there must be no machine learning jobs running. You can close the machine
	/// learning jobs, do the upgrade, then open all the jobs again. Alternatively,
	/// you can use this API to temporarily halt tasks associated with the jobs and
	/// datafeeds and prevent new jobs from opening. You can also use this API
	/// during upgrades that do not require you to reindex your machine learning
	/// indices, though stopping jobs is not a requirement in that case.
	/// You can see the current value for the upgrade_mode setting by using the get
	/// machine learning info API.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SetUpgradeModeResponse> SetUpgradeModeAsync(SetUpgradeModeRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<SetUpgradeModeRequest, SetUpgradeModeResponse, SetUpgradeModeRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Set upgrade_mode for ML indices.
	/// Sets a cluster wide upgrade_mode setting that prepares machine learning
	/// indices for an upgrade.
	/// When upgrading your cluster, in some circumstances you must restart your
	/// nodes and reindex your machine learning indices. In those circumstances,
	/// there must be no machine learning jobs running. You can close the machine
	/// learning jobs, do the upgrade, then open all the jobs again. Alternatively,
	/// you can use this API to temporarily halt tasks associated with the jobs and
	/// datafeeds and prevent new jobs from opening. You can also use this API
	/// during upgrades that do not require you to reindex your machine learning
	/// indices, though stopping jobs is not a requirement in that case.
	/// You can see the current value for the upgrade_mode setting by using the get
	/// machine learning info API.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SetUpgradeModeResponse> SetUpgradeModeAsync(SetUpgradeModeRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<SetUpgradeModeRequestDescriptor, SetUpgradeModeResponse, SetUpgradeModeRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Set upgrade_mode for ML indices.
	/// Sets a cluster wide upgrade_mode setting that prepares machine learning
	/// indices for an upgrade.
	/// When upgrading your cluster, in some circumstances you must restart your
	/// nodes and reindex your machine learning indices. In those circumstances,
	/// there must be no machine learning jobs running. You can close the machine
	/// learning jobs, do the upgrade, then open all the jobs again. Alternatively,
	/// you can use this API to temporarily halt tasks associated with the jobs and
	/// datafeeds and prevent new jobs from opening. You can also use this API
	/// during upgrades that do not require you to reindex your machine learning
	/// indices, though stopping jobs is not a requirement in that case.
	/// You can see the current value for the upgrade_mode setting by using the get
	/// machine learning info API.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SetUpgradeModeResponse> SetUpgradeModeAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new SetUpgradeModeRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<SetUpgradeModeRequestDescriptor, SetUpgradeModeResponse, SetUpgradeModeRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Set upgrade_mode for ML indices.
	/// Sets a cluster wide upgrade_mode setting that prepares machine learning
	/// indices for an upgrade.
	/// When upgrading your cluster, in some circumstances you must restart your
	/// nodes and reindex your machine learning indices. In those circumstances,
	/// there must be no machine learning jobs running. You can close the machine
	/// learning jobs, do the upgrade, then open all the jobs again. Alternatively,
	/// you can use this API to temporarily halt tasks associated with the jobs and
	/// datafeeds and prevent new jobs from opening. You can also use this API
	/// during upgrades that do not require you to reindex your machine learning
	/// indices, though stopping jobs is not a requirement in that case.
	/// You can see the current value for the upgrade_mode setting by using the get
	/// machine learning info API.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SetUpgradeModeResponse> SetUpgradeModeAsync(Action<SetUpgradeModeRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new SetUpgradeModeRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<SetUpgradeModeRequestDescriptor, SetUpgradeModeResponse, SetUpgradeModeRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start datafeeds.
	/// </para>
	/// <para>
	/// A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped
	/// multiple times throughout its lifecycle.
	/// </para>
	/// <para>
	/// Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.
	/// </para>
	/// <para>
	/// If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped.
	/// If new data was indexed for that exact millisecond between stopping and starting, it will be ignored.
	/// </para>
	/// <para>
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or
	/// update it had at the time of creation or update and runs the query using those same roles. If you provided secondary
	/// authorization headers when you created or updated the datafeed, those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDatafeedResponse> StartDatafeedAsync(StartDatafeedRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<StartDatafeedRequest, StartDatafeedResponse, StartDatafeedRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start datafeeds.
	/// </para>
	/// <para>
	/// A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped
	/// multiple times throughout its lifecycle.
	/// </para>
	/// <para>
	/// Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.
	/// </para>
	/// <para>
	/// If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped.
	/// If new data was indexed for that exact millisecond between stopping and starting, it will be ignored.
	/// </para>
	/// <para>
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or
	/// update it had at the time of creation or update and runs the query using those same roles. If you provided secondary
	/// authorization headers when you created or updated the datafeed, those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDatafeedResponse> StartDatafeedAsync(StartDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<StartDatafeedRequestDescriptor, StartDatafeedResponse, StartDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start datafeeds.
	/// </para>
	/// <para>
	/// A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped
	/// multiple times throughout its lifecycle.
	/// </para>
	/// <para>
	/// Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.
	/// </para>
	/// <para>
	/// If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped.
	/// If new data was indexed for that exact millisecond between stopping and starting, it will be ignored.
	/// </para>
	/// <para>
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or
	/// update it had at the time of creation or update and runs the query using those same roles. If you provided secondary
	/// authorization headers when you created or updated the datafeed, those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDatafeedResponse> StartDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default)
	{
		var descriptor = new StartDatafeedRequestDescriptor(datafeedId);
		descriptor.BeforeRequest();
		return DoRequestAsync<StartDatafeedRequestDescriptor, StartDatafeedResponse, StartDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start datafeeds.
	/// </para>
	/// <para>
	/// A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped
	/// multiple times throughout its lifecycle.
	/// </para>
	/// <para>
	/// Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.
	/// </para>
	/// <para>
	/// If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped.
	/// If new data was indexed for that exact millisecond between stopping and starting, it will be ignored.
	/// </para>
	/// <para>
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or
	/// update it had at the time of creation or update and runs the query using those same roles. If you provided secondary
	/// authorization headers when you created or updated the datafeed, those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDatafeedResponse> StartDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action<StartDatafeedRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new StartDatafeedRequestDescriptor(datafeedId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<StartDatafeedRequestDescriptor, StartDatafeedResponse, StartDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a data frame analytics job.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// If the destination index does not exist, it is created automatically the
	/// first time you start the data frame analytics job. The
	/// <c>index.number_of_shards</c> and <c>index.number_of_replicas</c> settings for the
	/// destination index are copied from the source index. If there are multiple
	/// source indices, the destination index copies the highest setting values. The
	/// mappings for the destination index are also copied from the source indices.
	/// If there are any mapping conflicts, the job fails to start.
	/// If the destination index exists, it is used as is. You can therefore set up
	/// the destination index in advance with custom settings and mappings.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDataFrameAnalyticsResponse> StartDataFrameAnalyticsAsync(StartDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<StartDataFrameAnalyticsRequest, StartDataFrameAnalyticsResponse, StartDataFrameAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a data frame analytics job.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// If the destination index does not exist, it is created automatically the
	/// first time you start the data frame analytics job. The
	/// <c>index.number_of_shards</c> and <c>index.number_of_replicas</c> settings for the
	/// destination index are copied from the source index. If there are multiple
	/// source indices, the destination index copies the highest setting values. The
	/// mappings for the destination index are also copied from the source indices.
	/// If there are any mapping conflicts, the job fails to start.
	/// If the destination index exists, it is used as is. You can therefore set up
	/// the destination index in advance with custom settings and mappings.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDataFrameAnalyticsResponse> StartDataFrameAnalyticsAsync<TDocument>(StartDataFrameAnalyticsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<StartDataFrameAnalyticsRequestDescriptor<TDocument>, StartDataFrameAnalyticsResponse, StartDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a data frame analytics job.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// If the destination index does not exist, it is created automatically the
	/// first time you start the data frame analytics job. The
	/// <c>index.number_of_shards</c> and <c>index.number_of_replicas</c> settings for the
	/// destination index are copied from the source index. If there are multiple
	/// source indices, the destination index copies the highest setting values. The
	/// mappings for the destination index are also copied from the source indices.
	/// If there are any mapping conflicts, the job fails to start.
	/// If the destination index exists, it is used as is. You can therefore set up
	/// the destination index in advance with custom settings and mappings.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDataFrameAnalyticsResponse> StartDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
	{
		var descriptor = new StartDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<StartDataFrameAnalyticsRequestDescriptor<TDocument>, StartDataFrameAnalyticsResponse, StartDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a data frame analytics job.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// If the destination index does not exist, it is created automatically the
	/// first time you start the data frame analytics job. The
	/// <c>index.number_of_shards</c> and <c>index.number_of_replicas</c> settings for the
	/// destination index are copied from the source index. If there are multiple
	/// source indices, the destination index copies the highest setting values. The
	/// mappings for the destination index are also copied from the source indices.
	/// If there are any mapping conflicts, the job fails to start.
	/// If the destination index exists, it is used as is. You can therefore set up
	/// the destination index in advance with custom settings and mappings.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDataFrameAnalyticsResponse> StartDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<StartDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new StartDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<StartDataFrameAnalyticsRequestDescriptor<TDocument>, StartDataFrameAnalyticsResponse, StartDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a data frame analytics job.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// If the destination index does not exist, it is created automatically the
	/// first time you start the data frame analytics job. The
	/// <c>index.number_of_shards</c> and <c>index.number_of_replicas</c> settings for the
	/// destination index are copied from the source index. If there are multiple
	/// source indices, the destination index copies the highest setting values. The
	/// mappings for the destination index are also copied from the source indices.
	/// If there are any mapping conflicts, the job fails to start.
	/// If the destination index exists, it is used as is. You can therefore set up
	/// the destination index in advance with custom settings and mappings.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDataFrameAnalyticsResponse> StartDataFrameAnalyticsAsync(StartDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<StartDataFrameAnalyticsRequestDescriptor, StartDataFrameAnalyticsResponse, StartDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a data frame analytics job.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// If the destination index does not exist, it is created automatically the
	/// first time you start the data frame analytics job. The
	/// <c>index.number_of_shards</c> and <c>index.number_of_replicas</c> settings for the
	/// destination index are copied from the source index. If there are multiple
	/// source indices, the destination index copies the highest setting values. The
	/// mappings for the destination index are also copied from the source indices.
	/// If there are any mapping conflicts, the job fails to start.
	/// If the destination index exists, it is used as is. You can therefore set up
	/// the destination index in advance with custom settings and mappings.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDataFrameAnalyticsResponse> StartDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
	{
		var descriptor = new StartDataFrameAnalyticsRequestDescriptor(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<StartDataFrameAnalyticsRequestDescriptor, StartDataFrameAnalyticsResponse, StartDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a data frame analytics job.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// If the destination index does not exist, it is created automatically the
	/// first time you start the data frame analytics job. The
	/// <c>index.number_of_shards</c> and <c>index.number_of_replicas</c> settings for the
	/// destination index are copied from the source index. If there are multiple
	/// source indices, the destination index copies the highest setting values. The
	/// mappings for the destination index are also copied from the source indices.
	/// If there are any mapping conflicts, the job fails to start.
	/// If the destination index exists, it is used as is. You can therefore set up
	/// the destination index in advance with custom settings and mappings.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartDataFrameAnalyticsResponse> StartDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<StartDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new StartDataFrameAnalyticsRequestDescriptor(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<StartDataFrameAnalyticsRequestDescriptor, StartDataFrameAnalyticsResponse, StartDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a trained model deployment.
	/// It allocates the model to every machine learning node.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartTrainedModelDeploymentResponse> StartTrainedModelDeploymentAsync(StartTrainedModelDeploymentRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<StartTrainedModelDeploymentRequest, StartTrainedModelDeploymentResponse, StartTrainedModelDeploymentRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a trained model deployment.
	/// It allocates the model to every machine learning node.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartTrainedModelDeploymentResponse> StartTrainedModelDeploymentAsync(StartTrainedModelDeploymentRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<StartTrainedModelDeploymentRequestDescriptor, StartTrainedModelDeploymentResponse, StartTrainedModelDeploymentRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a trained model deployment.
	/// It allocates the model to every machine learning node.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartTrainedModelDeploymentResponse> StartTrainedModelDeploymentAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new StartTrainedModelDeploymentRequestDescriptor(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<StartTrainedModelDeploymentRequestDescriptor, StartTrainedModelDeploymentResponse, StartTrainedModelDeploymentRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Start a trained model deployment.
	/// It allocates the model to every machine learning node.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartTrainedModelDeploymentResponse> StartTrainedModelDeploymentAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action<StartTrainedModelDeploymentRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new StartTrainedModelDeploymentRequestDescriptor(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<StartTrainedModelDeploymentRequestDescriptor, StartTrainedModelDeploymentResponse, StartTrainedModelDeploymentRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop datafeeds.
	/// A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped
	/// multiple times throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDatafeedResponse> StopDatafeedAsync(StopDatafeedRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<StopDatafeedRequest, StopDatafeedResponse, StopDatafeedRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop datafeeds.
	/// A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped
	/// multiple times throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDatafeedResponse> StopDatafeedAsync(StopDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<StopDatafeedRequestDescriptor, StopDatafeedResponse, StopDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop datafeeds.
	/// A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped
	/// multiple times throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDatafeedResponse> StopDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default)
	{
		var descriptor = new StopDatafeedRequestDescriptor(datafeedId);
		descriptor.BeforeRequest();
		return DoRequestAsync<StopDatafeedRequestDescriptor, StopDatafeedResponse, StopDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop datafeeds.
	/// A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped
	/// multiple times throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDatafeedResponse> StopDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action<StopDatafeedRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new StopDatafeedRequestDescriptor(datafeedId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<StopDatafeedRequestDescriptor, StopDatafeedResponse, StopDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop data frame analytics jobs.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDataFrameAnalyticsResponse> StopDataFrameAnalyticsAsync(StopDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<StopDataFrameAnalyticsRequest, StopDataFrameAnalyticsResponse, StopDataFrameAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop data frame analytics jobs.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDataFrameAnalyticsResponse> StopDataFrameAnalyticsAsync<TDocument>(StopDataFrameAnalyticsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<StopDataFrameAnalyticsRequestDescriptor<TDocument>, StopDataFrameAnalyticsResponse, StopDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop data frame analytics jobs.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDataFrameAnalyticsResponse> StopDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
	{
		var descriptor = new StopDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<StopDataFrameAnalyticsRequestDescriptor<TDocument>, StopDataFrameAnalyticsResponse, StopDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop data frame analytics jobs.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDataFrameAnalyticsResponse> StopDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<StopDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new StopDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<StopDataFrameAnalyticsRequestDescriptor<TDocument>, StopDataFrameAnalyticsResponse, StopDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop data frame analytics jobs.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDataFrameAnalyticsResponse> StopDataFrameAnalyticsAsync(StopDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<StopDataFrameAnalyticsRequestDescriptor, StopDataFrameAnalyticsResponse, StopDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop data frame analytics jobs.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDataFrameAnalyticsResponse> StopDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
	{
		var descriptor = new StopDataFrameAnalyticsRequestDescriptor(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<StopDataFrameAnalyticsRequestDescriptor, StopDataFrameAnalyticsResponse, StopDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop data frame analytics jobs.
	/// A data frame analytics job can be started and stopped multiple times
	/// throughout its lifecycle.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopDataFrameAnalyticsResponse> StopDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<StopDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new StopDataFrameAnalyticsRequestDescriptor(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<StopDataFrameAnalyticsRequestDescriptor, StopDataFrameAnalyticsResponse, StopDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop a trained model deployment.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/stop-trained-model-deployment.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopTrainedModelDeploymentResponse> StopTrainedModelDeploymentAsync(StopTrainedModelDeploymentRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<StopTrainedModelDeploymentRequest, StopTrainedModelDeploymentResponse, StopTrainedModelDeploymentRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop a trained model deployment.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/stop-trained-model-deployment.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopTrainedModelDeploymentResponse> StopTrainedModelDeploymentAsync(StopTrainedModelDeploymentRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<StopTrainedModelDeploymentRequestDescriptor, StopTrainedModelDeploymentResponse, StopTrainedModelDeploymentRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop a trained model deployment.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/stop-trained-model-deployment.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopTrainedModelDeploymentResponse> StopTrainedModelDeploymentAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, CancellationToken cancellationToken = default)
	{
		var descriptor = new StopTrainedModelDeploymentRequestDescriptor(modelId);
		descriptor.BeforeRequest();
		return DoRequestAsync<StopTrainedModelDeploymentRequestDescriptor, StopTrainedModelDeploymentResponse, StopTrainedModelDeploymentRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Stop a trained model deployment.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/stop-trained-model-deployment.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopTrainedModelDeploymentResponse> StopTrainedModelDeploymentAsync(Elastic.Clients.Elasticsearch.Serverless.Id modelId, Action<StopTrainedModelDeploymentRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new StopTrainedModelDeploymentRequestDescriptor(modelId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<StopTrainedModelDeploymentRequestDescriptor, StopTrainedModelDeploymentResponse, StopTrainedModelDeploymentRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a datafeed.
	/// You must stop and start the datafeed for the changes to be applied.
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
	/// the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
	/// those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDatafeedResponse> UpdateDatafeedAsync(UpdateDatafeedRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<UpdateDatafeedRequest, UpdateDatafeedResponse, UpdateDatafeedRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a datafeed.
	/// You must stop and start the datafeed for the changes to be applied.
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
	/// the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
	/// those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDatafeedResponse> UpdateDatafeedAsync<TDocument>(UpdateDatafeedRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDatafeedRequestDescriptor<TDocument>, UpdateDatafeedResponse, UpdateDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a datafeed.
	/// You must stop and start the datafeed for the changes to be applied.
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
	/// the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
	/// those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDatafeedResponse> UpdateDatafeedAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateDatafeedRequestDescriptor<TDocument>(datafeedId);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDatafeedRequestDescriptor<TDocument>, UpdateDatafeedResponse, UpdateDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a datafeed.
	/// You must stop and start the datafeed for the changes to be applied.
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
	/// the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
	/// those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDatafeedResponse> UpdateDatafeedAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action<UpdateDatafeedRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateDatafeedRequestDescriptor<TDocument>(datafeedId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDatafeedRequestDescriptor<TDocument>, UpdateDatafeedResponse, UpdateDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a datafeed.
	/// You must stop and start the datafeed for the changes to be applied.
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
	/// the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
	/// those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDatafeedResponse> UpdateDatafeedAsync(UpdateDatafeedRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDatafeedRequestDescriptor, UpdateDatafeedResponse, UpdateDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a datafeed.
	/// You must stop and start the datafeed for the changes to be applied.
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
	/// the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
	/// those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDatafeedResponse> UpdateDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateDatafeedRequestDescriptor(datafeedId);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDatafeedRequestDescriptor, UpdateDatafeedResponse, UpdateDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a datafeed.
	/// You must stop and start the datafeed for the changes to be applied.
	/// When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
	/// the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
	/// those credentials are used instead.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDatafeedResponse> UpdateDatafeedAsync(Elastic.Clients.Elasticsearch.Serverless.Id datafeedId, Action<UpdateDatafeedRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateDatafeedRequestDescriptor(datafeedId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDatafeedRequestDescriptor, UpdateDatafeedResponse, UpdateDatafeedRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDataFrameAnalyticsResponse> UpdateDataFrameAnalyticsAsync(UpdateDataFrameAnalyticsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<UpdateDataFrameAnalyticsRequest, UpdateDataFrameAnalyticsResponse, UpdateDataFrameAnalyticsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDataFrameAnalyticsResponse> UpdateDataFrameAnalyticsAsync<TDocument>(UpdateDataFrameAnalyticsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDataFrameAnalyticsRequestDescriptor<TDocument>, UpdateDataFrameAnalyticsResponse, UpdateDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDataFrameAnalyticsResponse> UpdateDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDataFrameAnalyticsRequestDescriptor<TDocument>, UpdateDataFrameAnalyticsResponse, UpdateDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDataFrameAnalyticsResponse> UpdateDataFrameAnalyticsAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<UpdateDataFrameAnalyticsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateDataFrameAnalyticsRequestDescriptor<TDocument>(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDataFrameAnalyticsRequestDescriptor<TDocument>, UpdateDataFrameAnalyticsResponse, UpdateDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDataFrameAnalyticsResponse> UpdateDataFrameAnalyticsAsync(UpdateDataFrameAnalyticsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDataFrameAnalyticsRequestDescriptor, UpdateDataFrameAnalyticsResponse, UpdateDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDataFrameAnalyticsResponse> UpdateDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateDataFrameAnalyticsRequestDescriptor(id);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDataFrameAnalyticsRequestDescriptor, UpdateDataFrameAnalyticsResponse, UpdateDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a data frame analytics job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateDataFrameAnalyticsResponse> UpdateDataFrameAnalyticsAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<UpdateDataFrameAnalyticsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateDataFrameAnalyticsRequestDescriptor(id);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateDataFrameAnalyticsRequestDescriptor, UpdateDataFrameAnalyticsResponse, UpdateDataFrameAnalyticsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a filter.
	/// Updates the description of a filter, adds items, or removes items from the list.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateFilterResponse> UpdateFilterAsync(UpdateFilterRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<UpdateFilterRequest, UpdateFilterResponse, UpdateFilterRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a filter.
	/// Updates the description of a filter, adds items, or removes items from the list.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateFilterResponse> UpdateFilterAsync(UpdateFilterRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateFilterRequestDescriptor, UpdateFilterResponse, UpdateFilterRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a filter.
	/// Updates the description of a filter, adds items, or removes items from the list.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateFilterResponse> UpdateFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateFilterRequestDescriptor(filterId);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateFilterRequestDescriptor, UpdateFilterResponse, UpdateFilterRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a filter.
	/// Updates the description of a filter, adds items, or removes items from the list.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateFilterResponse> UpdateFilterAsync(Elastic.Clients.Elasticsearch.Serverless.Id filterId, Action<UpdateFilterRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateFilterRequestDescriptor(filterId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateFilterRequestDescriptor, UpdateFilterResponse, UpdateFilterRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update an anomaly detection job.
	/// Updates certain properties of an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateJobResponse> UpdateJobAsync(UpdateJobRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<UpdateJobRequest, UpdateJobResponse, UpdateJobRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update an anomaly detection job.
	/// Updates certain properties of an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateJobResponse> UpdateJobAsync<TDocument>(UpdateJobRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateJobRequestDescriptor<TDocument>, UpdateJobResponse, UpdateJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update an anomaly detection job.
	/// Updates certain properties of an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateJobResponse> UpdateJobAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateJobRequestDescriptor<TDocument>(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateJobRequestDescriptor<TDocument>, UpdateJobResponse, UpdateJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update an anomaly detection job.
	/// Updates certain properties of an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateJobResponse> UpdateJobAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<UpdateJobRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateJobRequestDescriptor<TDocument>(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateJobRequestDescriptor<TDocument>, UpdateJobResponse, UpdateJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update an anomaly detection job.
	/// Updates certain properties of an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateJobResponse> UpdateJobAsync(UpdateJobRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateJobRequestDescriptor, UpdateJobResponse, UpdateJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update an anomaly detection job.
	/// Updates certain properties of an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateJobResponse> UpdateJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateJobRequestDescriptor(jobId);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateJobRequestDescriptor, UpdateJobResponse, UpdateJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update an anomaly detection job.
	/// Updates certain properties of an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateJobResponse> UpdateJobAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Action<UpdateJobRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateJobRequestDescriptor(jobId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateJobRequestDescriptor, UpdateJobResponse, UpdateJobRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a snapshot.
	/// Updates certain properties of a snapshot.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateModelSnapshotResponse> UpdateModelSnapshotAsync(UpdateModelSnapshotRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<UpdateModelSnapshotRequest, UpdateModelSnapshotResponse, UpdateModelSnapshotRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a snapshot.
	/// Updates certain properties of a snapshot.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateModelSnapshotResponse> UpdateModelSnapshotAsync(UpdateModelSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateModelSnapshotRequestDescriptor, UpdateModelSnapshotResponse, UpdateModelSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a snapshot.
	/// Updates certain properties of a snapshot.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateModelSnapshotResponse> UpdateModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateModelSnapshotRequestDescriptor(jobId, snapshotId);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateModelSnapshotRequestDescriptor, UpdateModelSnapshotResponse, UpdateModelSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Update a snapshot.
	/// Updates certain properties of a snapshot.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpdateModelSnapshotResponse> UpdateModelSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, Action<UpdateModelSnapshotRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpdateModelSnapshotRequestDescriptor(jobId, snapshotId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpdateModelSnapshotRequestDescriptor, UpdateModelSnapshotResponse, UpdateModelSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Upgrade a snapshot.
	/// Upgrades an anomaly detection model snapshot to the latest major version.
	/// Over time, older snapshot formats are deprecated and removed. Anomaly
	/// detection jobs support only snapshots that are from the current or previous
	/// major version.
	/// This API provides a means to upgrade a snapshot to the current major version.
	/// This aids in preparing the cluster for an upgrade to the next major version.
	/// Only one snapshot per anomaly detection job can be upgraded at a time and the
	/// upgraded snapshot cannot be the current snapshot of the anomaly detection
	/// job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpgradeJobSnapshotResponse> UpgradeJobSnapshotAsync(UpgradeJobSnapshotRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<UpgradeJobSnapshotRequest, UpgradeJobSnapshotResponse, UpgradeJobSnapshotRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Upgrade a snapshot.
	/// Upgrades an anomaly detection model snapshot to the latest major version.
	/// Over time, older snapshot formats are deprecated and removed. Anomaly
	/// detection jobs support only snapshots that are from the current or previous
	/// major version.
	/// This API provides a means to upgrade a snapshot to the current major version.
	/// This aids in preparing the cluster for an upgrade to the next major version.
	/// Only one snapshot per anomaly detection job can be upgraded at a time and the
	/// upgraded snapshot cannot be the current snapshot of the anomaly detection
	/// job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpgradeJobSnapshotResponse> UpgradeJobSnapshotAsync(UpgradeJobSnapshotRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<UpgradeJobSnapshotRequestDescriptor, UpgradeJobSnapshotResponse, UpgradeJobSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Upgrade a snapshot.
	/// Upgrades an anomaly detection model snapshot to the latest major version.
	/// Over time, older snapshot formats are deprecated and removed. Anomaly
	/// detection jobs support only snapshots that are from the current or previous
	/// major version.
	/// This API provides a means to upgrade a snapshot to the current major version.
	/// This aids in preparing the cluster for an upgrade to the next major version.
	/// Only one snapshot per anomaly detection job can be upgraded at a time and the
	/// upgraded snapshot cannot be the current snapshot of the anomaly detection
	/// job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpgradeJobSnapshotResponse> UpgradeJobSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpgradeJobSnapshotRequestDescriptor(jobId, snapshotId);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpgradeJobSnapshotRequestDescriptor, UpgradeJobSnapshotResponse, UpgradeJobSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Upgrade a snapshot.
	/// Upgrades an anomaly detection model snapshot to the latest major version.
	/// Over time, older snapshot formats are deprecated and removed. Anomaly
	/// detection jobs support only snapshots that are from the current or previous
	/// major version.
	/// This API provides a means to upgrade a snapshot to the current major version.
	/// This aids in preparing the cluster for an upgrade to the next major version.
	/// Only one snapshot per anomaly detection job can be upgraded at a time and the
	/// upgraded snapshot cannot be the current snapshot of the anomaly detection
	/// job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<UpgradeJobSnapshotResponse> UpgradeJobSnapshotAsync(Elastic.Clients.Elasticsearch.Serverless.Id jobId, Elastic.Clients.Elasticsearch.Serverless.Id snapshotId, Action<UpgradeJobSnapshotRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new UpgradeJobSnapshotRequestDescriptor(jobId, snapshotId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<UpgradeJobSnapshotRequestDescriptor, UpgradeJobSnapshotResponse, UpgradeJobSnapshotRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateResponse> ValidateAsync(ValidateRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ValidateRequest, ValidateResponse, ValidateRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateResponse> ValidateAsync<TDocument>(ValidateRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateRequestDescriptor<TDocument>, ValidateResponse, ValidateRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateResponse> ValidateAsync<TDocument>(CancellationToken cancellationToken = default)
	{
		var descriptor = new ValidateRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateRequestDescriptor<TDocument>, ValidateResponse, ValidateRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateResponse> ValidateAsync<TDocument>(Action<ValidateRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ValidateRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateRequestDescriptor<TDocument>, ValidateResponse, ValidateRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateResponse> ValidateAsync(ValidateRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateRequestDescriptor, ValidateResponse, ValidateRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateResponse> ValidateAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new ValidateRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateRequestDescriptor, ValidateResponse, ValidateRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection job.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateResponse> ValidateAsync(Action<ValidateRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ValidateRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateRequestDescriptor, ValidateResponse, ValidateRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection detector.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateDetectorResponse> ValidateDetectorAsync(ValidateDetectorRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ValidateDetectorRequest, ValidateDetectorResponse, ValidateDetectorRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection detector.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateDetectorResponse> ValidateDetectorAsync<TDocument>(ValidateDetectorRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateDetectorRequestDescriptor<TDocument>, ValidateDetectorResponse, ValidateDetectorRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection detector.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateDetectorResponse> ValidateDetectorAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector, CancellationToken cancellationToken = default)
	{
		var descriptor = new ValidateDetectorRequestDescriptor<TDocument>(detector);
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateDetectorRequestDescriptor<TDocument>, ValidateDetectorResponse, ValidateDetectorRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection detector.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateDetectorResponse> ValidateDetectorAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector, Action<ValidateDetectorRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ValidateDetectorRequestDescriptor<TDocument>(detector);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateDetectorRequestDescriptor<TDocument>, ValidateDetectorResponse, ValidateDetectorRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection detector.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateDetectorResponse> ValidateDetectorAsync(ValidateDetectorRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateDetectorRequestDescriptor, ValidateDetectorResponse, ValidateDetectorRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection detector.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateDetectorResponse> ValidateDetectorAsync(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector, CancellationToken cancellationToken = default)
	{
		var descriptor = new ValidateDetectorRequestDescriptor(detector);
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateDetectorRequestDescriptor, ValidateDetectorResponse, ValidateDetectorRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Validates an anomaly detection detector.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ValidateDetectorResponse> ValidateDetectorAsync(Elastic.Clients.Elasticsearch.Serverless.MachineLearning.Detector detector, Action<ValidateDetectorRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ValidateDetectorRequestDescriptor(detector);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ValidateDetectorRequestDescriptor, ValidateDetectorResponse, ValidateDetectorRequestParameters>(descriptor, cancellationToken);
	}
}